mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 01:45:55 +08:00
Only save and load .md files
For now I only want to deal with markdown. In the future, we can move towards maybe accepting all .txt files as well? Not sure.
This commit is contained in:
@ -50,7 +50,7 @@ class StateContainerState extends State<StateContainer> {
|
||||
getDirectory: getNotesDir,
|
||||
dirName: "journal",
|
||||
gitCloneUrl: "root@bcn.vhanda.in:git/test",
|
||||
fileNameGenerator: (Note n) => toIso8601WithTimezone(n.created),
|
||||
fileNameGenerator: (Note n) => toIso8601WithTimezone(n.created) + '.md',
|
||||
);
|
||||
|
||||
StateContainerState(bool onBoardingCompleted) {
|
||||
|
@ -32,6 +32,10 @@ class FileStorage implements NoteRepository {
|
||||
if (note == null) {
|
||||
continue;
|
||||
}
|
||||
if (!fileEntity.path.endsWith('.md') &&
|
||||
!fileEntity.path.endsWith('.MD')) {
|
||||
continue;
|
||||
}
|
||||
if (note.id == null) {
|
||||
String filename = p.basename(fileEntity.path);
|
||||
note.id = filename;
|
||||
|
Reference in New Issue
Block a user