mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 15:29:15 +01:00
invalidate the library cache before publishing the sync result
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user