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.
This commit is contained in:
Alexander Capehart 2025-01-04 12:07:57 -07:00
parent 3007ad3ced
commit 20be8c17fe
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47

View file

@ -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) {