Some clean up on room details

This commit is contained in:
ganfra 2023-04-12 12:22:13 +02:00
parent 7a247e1c29
commit 281f90e148
7 changed files with 37 additions and 71 deletions

View file

@ -88,6 +88,7 @@ class RustMatrixRoom(
coroutineDispatchers = coroutineDispatchers
)
}
override fun close() {
innerRoom.destroy()
slidingSyncRoom.destroy()
@ -183,7 +184,9 @@ class RustMatrixRoom(
}
}
override fun leave(): Result<Unit> {
return runCatching { innerRoom.leave() }
override suspend fun leave(): Result<Unit> = withContext(coroutineDispatchers.io) {
runCatching {
innerRoom.leave()
}
}
}