From 618b63bfc09c443180696444875d6cca5b25ab30 Mon Sep 17 00:00:00 2001 From: Thibault Deckers Date: Mon, 7 Oct 2024 19:28:20 +0200 Subject: [PATCH] source: dismiss changes if only loaded for specific directory --- lib/model/source/media_store_source.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/model/source/media_store_source.dart b/lib/model/source/media_store_source.dart index 90711077e..9ebb826a8 100644 --- a/lib/model/source/media_store_source.dart +++ b/lib/model/source/media_store_source.dart @@ -329,6 +329,10 @@ class MediaStoreSource extends CollectionSource { } void onStoreChanged(String? uri) { + // dismiss changes if the source is only loaded to view a specific directory + // to let the main instance handle the change in the database + if (_initState == SourceInitializationState.directory) return; + if (uri != null) _changedUris.add(uri); if (_changedUris.isNotEmpty) { _changeDebouncer(() async {