mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Small API change in SDK 0.1.5: SlidingSyncState
This commit is contained in:
committed by
Benoit Marty
parent
18867dc8e6
commit
1708a77fb3
+2
-2
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user