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

View all threads screen implementation & UI

Add user friendly message thread summary on the SDK side
Fix not encrypted rooms thread summaries
This commit is contained in:
ariskotsomitopoulos
2021-11-23 13:34:24 +02:00
parent 586b3d8caa
commit 722f367690
28 changed files with 654 additions and 186 deletions

View File

@ -21,6 +21,7 @@ import kotlinx.coroutines.flow.Flow
import org.matrix.android.sdk.api.query.QueryStringValue
import org.matrix.android.sdk.api.session.events.model.Event
import org.matrix.android.sdk.api.session.room.Room
import org.matrix.android.sdk.api.session.room.RoomSummaryQueryParams
import org.matrix.android.sdk.api.session.room.members.RoomMemberQueryParams
import org.matrix.android.sdk.api.session.room.model.EventAnnotationsSummary
import org.matrix.android.sdk.api.session.room.model.ReadReceipt
@ -98,6 +99,13 @@ class FlowRoom(private val room: Room) {
fun liveNotificationState(): Flow<RoomNotificationState> {
return room.getLiveRoomNotificationState().asFlow()
}
fun liveThreadList(): Flow<List<TimelineEvent>> {
return room.getAllThreadsLive().asFlow()
.startWith(room.coroutineDispatchers.io) {
room.getAllThreads()
}
}
}
fun Room.flow(): FlowRoom {