read : use the new apis
This commit is contained in:
parent
ee2398fb8a
commit
6dc0d8706c
7 changed files with 45 additions and 36 deletions
|
|
@ -442,19 +442,15 @@ class RustMatrixRoom(
|
|||
}
|
||||
}
|
||||
|
||||
override suspend fun markAsRead(receiptType: ReceiptType?): Result<Unit> = withContext(roomDispatcher) {
|
||||
override suspend fun markAsRead(receiptType: ReceiptType): Result<Unit> = withContext(roomDispatcher) {
|
||||
runCatching {
|
||||
if (receiptType != null) {
|
||||
innerRoom.markAsReadAndSendReadReceipt(receiptType.toRustReceiptType())
|
||||
} else {
|
||||
innerRoom.markAsRead()
|
||||
}
|
||||
innerRoom.markAsRead(receiptType.toRustReceiptType())
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun markAsUnread(): Result<Unit> = withContext(roomDispatcher) {
|
||||
override suspend fun setUnreadFlag(isUnread: Boolean): Result<Unit> = withContext(roomDispatcher) {
|
||||
runCatching {
|
||||
innerRoom.markAsUnread()
|
||||
innerRoom.setUnreadFlag(isUnread)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue