mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-17 18:49:55 +08:00
Do not allow us to edit the Note Editor if the Note cannot be saved
In some rare cases the note just doesn't get saved on disk - in those cases instead of silently failing we will refuse to exit the note editor, forcing the user to copy the note and paste it somewhere else in order to not lose the date. This isn't the best solution, but it prevents data loss, in a few edge cases which I cannot reproduce. Fixes #124
This commit is contained in:
@ -58,3 +58,12 @@ NotesFolderFS getFolderForEditor(
|
||||
return rootFolder.getFolderWithSpec(spec);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> showAlertDialog(
|
||||
BuildContext context, String title, String message) async {
|
||||
var dialog = AlertDialog(
|
||||
title: Text(title),
|
||||
content: Text(message),
|
||||
);
|
||||
return showDialog(context: context, builder: (context) => dialog);
|
||||
}
|
||||
|
Reference in New Issue
Block a user