mirror of
https://github.com/ouchadam/small-talk.git
synced 2025-02-07 06:44:36 +01:00
porting to flow concat for the initial sync state read
This commit is contained in:
parent
5db1a87a38
commit
4d853f0338
@ -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 -> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user