mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 10:17:16 +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,
|
getDirectory: getNotesDir,
|
||||||
dirName: "journal",
|
dirName: "journal",
|
||||||
gitCloneUrl: "root@bcn.vhanda.in:git/test",
|
gitCloneUrl: "root@bcn.vhanda.in:git/test",
|
||||||
fileNameGenerator: (Note n) => toIso8601WithTimezone(n.created),
|
fileNameGenerator: (Note n) => toIso8601WithTimezone(n.created) + '.md',
|
||||||
);
|
);
|
||||||
|
|
||||||
StateContainerState(bool onBoardingCompleted) {
|
StateContainerState(bool onBoardingCompleted) {
|
||||||
|
@ -32,6 +32,10 @@ class FileStorage implements NoteRepository {
|
|||||||
if (note == null) {
|
if (note == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!fileEntity.path.endsWith('.md') &&
|
||||||
|
!fileEntity.path.endsWith('.MD')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (note.id == null) {
|
if (note.id == null) {
|
||||||
String filename = p.basename(fileEntity.path);
|
String filename = p.basename(fileEntity.path);
|
||||||
note.id = filename;
|
note.id = filename;
|
||||||
|
Reference in New Issue
Block a user