invalidate the library cache before publishing the sync result

This commit is contained in:
austinried
2026-10-04 00:29:58 +00:00
parent 8429a4529f
commit 0b5946e09b
@@ -47,7 +47,7 @@ class SyncManager(
private suspend fun runSync() { private suspend fun runSync() {
_status.value = SyncStatus.Running _status.value = SyncStatus.Running
_status.value = val result =
try { try {
val source = sourceRepository.activeMusicSource() ?: error("No server configured") val source = sourceRepository.activeMusicSource() ?: error("No server configured")
SyncService(db, source).sync() SyncService(db, source).sync()
@@ -59,6 +59,7 @@ class SyncManager(
SyncStatus.Failed(failure.message ?: "Sync failed") SyncStatus.Failed(failure.message ?: "Sync failed")
} }
queueRepository.invalidateLibraryCache() queueRepository.invalidateLibraryCache()
_status.value = result
} }
private companion object { private companion object {