Small API change in SDK 0.1.5: SlidingSyncState
This commit is contained in:
parent
5c0b3b8129
commit
57051e6368
1 changed files with 2 additions and 2 deletions
|
|
@ -53,7 +53,7 @@ internal class RustRoomSummaryDataSource(
|
||||||
private val coroutineScope = CoroutineScope(SupervisorJob() + coroutineDispatchers.io)
|
private val coroutineScope = CoroutineScope(SupervisorJob() + coroutineDispatchers.io)
|
||||||
|
|
||||||
private val roomSummaries = MutableStateFlow<List<RoomSummary>>(emptyList())
|
private val roomSummaries = MutableStateFlow<List<RoomSummary>>(emptyList())
|
||||||
private val state = MutableStateFlow(SlidingSyncState.COLD)
|
private val state = MutableStateFlow(SlidingSyncState.NOT_LOADED)
|
||||||
|
|
||||||
fun init() {
|
fun init() {
|
||||||
coroutineScope.launch {
|
coroutineScope.launch {
|
||||||
|
|
@ -101,7 +101,7 @@ internal class RustRoomSummaryDataSource(
|
||||||
|
|
||||||
private suspend fun didReceiveSyncUpdate(summary: UpdateSummary) {
|
private suspend fun didReceiveSyncUpdate(summary: UpdateSummary) {
|
||||||
Timber.v("UpdateRooms with identifiers: ${summary.rooms}")
|
Timber.v("UpdateRooms with identifiers: ${summary.rooms}")
|
||||||
if (state.value != SlidingSyncState.LIVE) {
|
if (state.value != SlidingSyncState.FULLY_LOADED) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
updateRoomSummaries {
|
updateRoomSummaries {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue