1
0
mirror of https://github.com/vector-im/element-android.git synced 2025-07-29 19:41:14 +03:00

Show a loader if all the Room Member are not yet loaded.

This commit is contained in:
Benoit Marty
2022-06-29 12:19:17 +02:00
parent 1a986e7437
commit e91be2b599
12 changed files with 165 additions and 22 deletions

View File

@ -53,6 +53,13 @@ class FlowRoom(private val room: Room) {
}
}
fun liveAreAllMembersLoaded(): Flow<Optional<Boolean>> {
return room.membershipService().areAllMembersLoadedLive().asFlow()
.startWith(room.coroutineDispatchers.io) {
room.membershipService().areAllMembersLoaded().toOptional()
}
}
fun liveAnnotationSummary(eventId: String): Flow<Optional<EventAnnotationsSummary>> {
return room.relationService().getEventAnnotationsSummaryLive(eventId).asFlow()
.startWith(room.coroutineDispatchers.io) {