porting to flow concat for the initial sync state read

This commit is contained in:
Adam Brown 2022-11-04 11:16:10 +00:00
parent 5db1a87a38
commit 4d853f0338
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ internal class DefaultSyncService(
}
override fun startSyncing(): Flow<Unit> {
return flow { emit(syncStore.read(SyncStore.SyncKey.Overview) != null) }.flatMapMerge { hasSynced ->
return flow { emit(syncStore.read(SyncStore.SyncKey.Overview) != null) }.flatMapConcat { hasSynced ->
when (hasSynced) {
true -> syncFlow.filter { false }.onStart { emit(Unit) }
false -> {