diff --git a/lib/state_container.dart b/lib/state_container.dart index 032ea8e8..2efdf44f 100644 --- a/lib/state_container.dart +++ b/lib/state_container.dart @@ -189,6 +189,14 @@ class StateContainerState extends State { void updateNote(Note note) { print("State Container updateNote"); setState(() { + // Update that specific note + for (var i = 0; i < appState.notes.length; i++) { + var n = appState.notes[i]; + if (n.filePath == note.filePath) { + appState.notes[i] = note; + } + } + noteRepo.updateNote(note).then((NoteRepoResult _) { _syncNotes(); });