Make RustMatrixClient.close asynchronous (#4513)
* Make `RustMatrixClient.close` asynchronous This is a safer way to destroy the Rust instances associated to it. Since `MatrixClient` doesn't implement `Closeable` anymore, the method has been renamed to `destroy` to follow the existing naming in the project.
This commit is contained in:
parent
2e191de343
commit
d7ca529db1
5 changed files with 20 additions and 25 deletions
|
|
@ -181,8 +181,6 @@ class FakeMatrixClient(
|
|||
deactivateAccountResult(password, eraseData)
|
||||
}
|
||||
|
||||
override fun close() = Unit
|
||||
|
||||
override suspend fun getUserProfile(): Result<MatrixUser> = simulateLongTask {
|
||||
val result = getProfileResults[sessionId]?.getOrNull() ?: MatrixUser(sessionId, userDisplayName, userAvatarUrl)
|
||||
_userProfile.tryEmit(result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue