Skip to content

Commit 297fafe

Browse files
author
davidwei
committed
Simplify logging in note update notifications
1 parent 403639f commit 297fafe

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

lib/providers/app_state_provider.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,12 @@ class AppStateProvider with ChangeNotifier {
168168
/// that might contain the updated note. Each provider handles existence
169169
/// checking internally, making it safe to call on all providers.
170170
void notifyNoteUpdated(Note updatedNote) {
171-
SeqLogger.info('AppStateProvider: notifyNoteUpdated called for note ${updatedNote.id}');
172-
173-
// Update cache in all NoteListProvider instances using null-safe calls
174-
// Each provider's updateLocalCache method handles existence checking
171+
SeqLogger.info('AppStateProvider: notifyNoteUpdated for note ${updatedNote.id}');
175172
_notesProvider.updateLocalCache(updatedNote);
176173
_searchProvider.updateLocalCache(updatedNote);
177174
_tagNotesProvider.updateLocalCache(updatedNote);
178175
_trashProvider.updateLocalCache(updatedNote);
179176
_discoveryProvider.updateLocalCache(updatedNote);
180-
181-
SeqLogger.info('AppStateProvider: notifyNoteUpdated completed for note ${updatedNote.id}');
182177
}
183178

184179
@override

lib/services/note_update_coordinator.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ class NoteUpdateCoordinator {
2121
/// internally, so it's safe to call this for all providers.
2222
void notifyNoteUpdated(Note updatedNote) {
2323
try {
24-
SeqLogger.info('NoteUpdateCoordinator.notifyNoteUpdated called: noteId=${updatedNote.id}');
2524
_appStateProvider.notifyNoteUpdated(updatedNote);
26-
SeqLogger.info('NoteUpdateCoordinator.notifyNoteUpdated completed successfully');
2725
} catch (e) {
2826
SeqLogger.severe('NoteUpdateCoordinator.notifyNoteUpdated error: $e');
2927
rethrow;

0 commit comments

Comments
 (0)