Accepting and declining invites

Hook up accept and decline buttons in the invites UI. Accept
will attempt to accept and then navigate to the room; decline
shows a confirmation dialog.

Fixes #106
This commit is contained in:
Chris Smith 2023-04-20 16:13:14 +01:00
parent 114e9725fa
commit ff5672597a
26 changed files with 582 additions and 77 deletions

View file

@ -23,7 +23,7 @@ import io.element.android.libraries.matrix.api.timeline.MatrixTimeline
import kotlinx.coroutines.flow.Flow
import java.io.Closeable
interface MatrixRoom: Closeable {
interface MatrixRoom : Closeable {
val roomId: RoomId
val name: String?
val bestName: String
@ -36,7 +36,7 @@ interface MatrixRoom: Closeable {
val isDirect: Boolean
val isPublic: Boolean
suspend fun members() : List<RoomMember>
suspend fun members(): List<RoomMember>
suspend fun memberCount(): Int
@ -63,4 +63,8 @@ interface MatrixRoom: Closeable {
suspend fun redactEvent(eventId: EventId, reason: String? = null): Result<Unit>
suspend fun leave(): Result<Unit>
suspend fun acceptInvitation(): Result<Unit>
suspend fun rejectInvitation(): Result<Unit>
}