From 20be8c17fe87262a6aa014d9a3c6b1779311bb8f Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sat, 4 Jan 2025 12:07:57 -0700 Subject: [PATCH] music: complete indexing after post-update steps Not the most ideal, but results in less state bugs with the current jank "pick folder" visibility in home. --- app/src/main/java/org/oxycblt/auxio/music/MusicRepository.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/music/MusicRepository.kt b/app/src/main/java/org/oxycblt/auxio/music/MusicRepository.kt index 86cbf834e..0262efac7 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/MusicRepository.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/MusicRepository.kt @@ -397,8 +397,6 @@ constructor( // later. musicSettings.revision = newRevision - emitIndexingCompletion(null) - // We want to make sure that all reads and writes are synchronized due to the sheer // amount of consumers of MusicRepository. // TODO: Would Atomics not be a better fit here? @@ -435,6 +433,8 @@ constructor( // to really lucky cancellations. Clean those up now that it's impossible for // the rest of the app to be using them. covers.cleanup(newLibrary.songs.mapNotNull { it.cover }) + + emitIndexingCompletion(null) } private suspend fun emitIndexingProgress(progress: IndexingProgress) {