From 704c8f4ce16774c1733eab42c2bed9b24532f073 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Fri, 11 Oct 2019 17:24:48 +0200 Subject: [PATCH] NoteEditor: Do not save a note if it has not been modified This would result in empty commits :( --- lib/screens/note_editor.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/screens/note_editor.dart b/lib/screens/note_editor.dart index 74068dd3..2463df98 100644 --- a/lib/screens/note_editor.dart +++ b/lib/screens/note_editor.dart @@ -168,6 +168,8 @@ class NoteEditorState extends State { } void _saveNote(BuildContext context) { + if (!_noteModified()) return; + final stateContainer = StateContainer.of(context); if (rawEditor == false) { note.body = _textController.text;