mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
NoteEditor: Do not save a note if it has not been modified
This would result in empty commits :(
This commit is contained in:
@ -168,6 +168,8 @@ class NoteEditorState extends State<NoteEditor> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _saveNote(BuildContext context) {
|
void _saveNote(BuildContext context) {
|
||||||
|
if (!_noteModified()) return;
|
||||||
|
|
||||||
final stateContainer = StateContainer.of(context);
|
final stateContainer = StateContainer.of(context);
|
||||||
if (rawEditor == false) {
|
if (rawEditor == false) {
|
||||||
note.body = _textController.text;
|
note.body = _textController.text;
|
||||||
|
Reference in New Issue
Block a user