mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 01:19:33 +00:00
Format files.
This commit is contained in:
+8
-17
@@ -199,15 +199,13 @@ class RustMatrixRoom(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun userDisplayName(userId: UserId): Result<String?> =
|
override suspend fun userDisplayName(userId: UserId): Result<String?> = withContext(roomDispatcher) {
|
||||||
withContext(roomDispatcher) {
|
|
||||||
runCatching {
|
runCatching {
|
||||||
innerRoom.memberDisplayName(userId.value)
|
innerRoom.memberDisplayName(userId.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun userAvatarUrl(userId: UserId): Result<String?> =
|
override suspend fun userAvatarUrl(userId: UserId): Result<String?> = withContext(roomDispatcher) {
|
||||||
withContext(roomDispatcher) {
|
|
||||||
runCatching {
|
runCatching {
|
||||||
innerRoom.memberAvatarUrl(userId.value)
|
innerRoom.memberAvatarUrl(userId.value)
|
||||||
}
|
}
|
||||||
@@ -324,44 +322,38 @@ class RustMatrixRoom(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun retrySendMessage(transactionId: TransactionId): Result<Unit> =
|
override suspend fun retrySendMessage(transactionId: TransactionId): Result<Unit> = withContext(roomDispatcher) {
|
||||||
withContext(roomDispatcher) {
|
|
||||||
runCatching {
|
runCatching {
|
||||||
innerRoom.retrySend(transactionId.value)
|
innerRoom.retrySend(transactionId.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun cancelSend(transactionId: TransactionId): Result<Unit> =
|
override suspend fun cancelSend(transactionId: TransactionId): Result<Unit> = withContext(roomDispatcher) {
|
||||||
withContext(roomDispatcher) {
|
|
||||||
runCatching {
|
runCatching {
|
||||||
innerRoom.cancelSend(transactionId.value)
|
innerRoom.cancelSend(transactionId.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalUnsignedTypes::class)
|
@OptIn(ExperimentalUnsignedTypes::class)
|
||||||
override suspend fun updateAvatar(mimeType: String, data: ByteArray): Result<Unit> =
|
override suspend fun updateAvatar(mimeType: String, data: ByteArray): Result<Unit> = withContext(roomDispatcher) {
|
||||||
withContext(roomDispatcher) {
|
|
||||||
runCatching {
|
runCatching {
|
||||||
innerRoom.uploadAvatar(mimeType, data.toUByteArray().toList())
|
innerRoom.uploadAvatar(mimeType, data.toUByteArray().toList())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun removeAvatar(): Result<Unit> =
|
override suspend fun removeAvatar(): Result<Unit> = withContext(roomDispatcher) {
|
||||||
withContext(roomDispatcher) {
|
|
||||||
runCatching {
|
runCatching {
|
||||||
innerRoom.removeAvatar()
|
innerRoom.removeAvatar()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun setName(name: String): Result<Unit> =
|
override suspend fun setName(name: String): Result<Unit> = withContext(roomDispatcher) {
|
||||||
withContext(roomDispatcher) {
|
|
||||||
runCatching {
|
runCatching {
|
||||||
innerRoom.setName(name)
|
innerRoom.setName(name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun setTopic(topic: String): Result<Unit> =
|
override suspend fun setTopic(topic: String): Result<Unit> = withContext(roomDispatcher) {
|
||||||
withContext(roomDispatcher) {
|
|
||||||
runCatching {
|
runCatching {
|
||||||
innerRoom.setTopic(topic)
|
innerRoom.setTopic(topic)
|
||||||
}
|
}
|
||||||
@@ -410,4 +402,3 @@ private suspend fun sendAttachment(handle: () -> SendAttachmentJoinHandle): Resu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user