#651 fixed duplicates when converting many items
This commit is contained in:
parent
c8950c5119
commit
c3e53b768c
2 changed files with 8 additions and 0 deletions
|
@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
- upgraded Flutter to stable v3.10.3
|
- upgraded Flutter to stable v3.10.3
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- duplicates when converting many items
|
||||||
|
|
||||||
## <a id="v1.8.8"></a>[v1.8.8] - 2023-05-28
|
## <a id="v1.8.8"></a>[v1.8.8] - 2023-05-28
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -220,6 +220,8 @@ class MediaStoreSource extends CollectionSource {
|
||||||
Future<Set<String>> refreshUris(Set<String> changedUris, {AnalysisController? analysisController}) async {
|
Future<Set<String>> refreshUris(Set<String> changedUris, {AnalysisController? analysisController}) async {
|
||||||
if (_initState == SourceInitializationState.none || !isMonitoring || !isReady) return changedUris;
|
if (_initState == SourceInitializationState.none || !isMonitoring || !isReady) return changedUris;
|
||||||
|
|
||||||
|
state = SourceState.loading;
|
||||||
|
|
||||||
debugPrint('$runtimeType refreshUris ${changedUris.length} uris');
|
debugPrint('$runtimeType refreshUris ${changedUris.length} uris');
|
||||||
final uriByContentId = Map.fromEntries(changedUris.map((uri) {
|
final uriByContentId = Map.fromEntries(changedUris.map((uri) {
|
||||||
final pathSegments = Uri.parse(uri).pathSegments;
|
final pathSegments = Uri.parse(uri).pathSegments;
|
||||||
|
@ -279,6 +281,8 @@ class MediaStoreSource extends CollectionSource {
|
||||||
|
|
||||||
invalidateAlbumFilterSummary(directories: existingDirectories);
|
invalidateAlbumFilterSummary(directories: existingDirectories);
|
||||||
|
|
||||||
|
state = SourceState.ready;
|
||||||
|
|
||||||
if (newEntries.isNotEmpty) {
|
if (newEntries.isNotEmpty) {
|
||||||
addEntries(newEntries);
|
addEntries(newEntries);
|
||||||
await metadataDb.saveEntries(newEntries);
|
await metadataDb.saveEntries(newEntries);
|
||||||
|
|
Loading…
Reference in a new issue