RoomList: update LoadingState and fix a crash

This commit is contained in:
ganfra 2023-06-26 22:30:12 +02:00
parent 8c66924be9
commit 19e2c104af
5 changed files with 45 additions and 20 deletions

View file

@ -29,12 +29,14 @@ class FakeSyncService : SyncService {
syncStateFlow.value = SyncState.InError
}
override fun startSync() {
override fun startSync(): Result<Unit> {
syncStateFlow.value = SyncState.Syncing
return Result.success(Unit)
}
override fun stopSync() {
override fun stopSync(): Result<Unit> {
syncStateFlow.value = SyncState.Terminated
return Result.success(Unit)
}
override val syncState: StateFlow<SyncState> = syncStateFlow