update isRefreshing value after sync op is complete

This commit is contained in:
Satindar Dhillon
2023-02-09 14:21:37 -08:00
parent 87dcebe730
commit 0cbc427c29

View File

@ -72,12 +72,11 @@ class LibraryViewModel @Inject constructor(
val syncStart = LocalDateTime.now()
val lastSyncDate = getLastSyncTime() ?: LocalDateTime.MIN
CoroutineScope(Dispatchers.Main).launch {
isRefreshing = false
}
withContext(Dispatchers.IO) {
performItemSync(cursor = null, since = lastSyncDate.toString(), count = 0, startTime = syncStart.toString())
CoroutineScope(Dispatchers.Main).launch {
isRefreshing = false
}
}
}