Rework some MatrixRoom api and fix rust 'destroyed' crash

This commit is contained in:
ganfra 2023-07-25 12:06:36 +02:00
parent 832fd69153
commit e35bb73a86
6 changed files with 76 additions and 71 deletions

View file

@ -63,7 +63,11 @@ interface MatrixRoom : Closeable {
val timeline: MatrixTimeline
fun open(): Result<Unit>
fun destroy()
fun subscribeToSync()
fun unsubscribeFromSync()
suspend fun userDisplayName(userId: UserId): Result<String?>
@ -133,6 +137,8 @@ interface MatrixRoom : Closeable {
zoomLevel: Int? = null,
assetType: AssetType? = null,
): Result<Unit>
override fun close() = destroy()
}