mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 01:19:33 +00:00
RoomList: try syncing when network is back and inError state
This commit is contained in:
+5
-7
@@ -23,21 +23,19 @@ import kotlinx.coroutines.flow.StateFlow
|
||||
|
||||
class FakeSyncService : SyncService {
|
||||
|
||||
private val syncState = MutableStateFlow(SyncState.Idle)
|
||||
private val syncStateFlow = MutableStateFlow(SyncState.Idle)
|
||||
|
||||
fun simulateError() {
|
||||
syncState.value = SyncState.InError
|
||||
syncStateFlow.value = SyncState.InError
|
||||
}
|
||||
|
||||
override fun startSync() {
|
||||
syncState.value = SyncState.Syncing
|
||||
syncStateFlow.value = SyncState.Syncing
|
||||
}
|
||||
|
||||
override fun stopSync() {
|
||||
syncState.value = SyncState.Terminated
|
||||
syncStateFlow.value = SyncState.Terminated
|
||||
}
|
||||
|
||||
override fun syncState(): StateFlow<SyncState> {
|
||||
return syncState
|
||||
}
|
||||
override val syncState: StateFlow<SyncState> = syncStateFlow
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user