core: optimize marking chat items as read, batch API (#4843)

* core: optimize marking chat items as read

* tests, ui types

* ios: fix api

* refactor
This commit is contained in:
Evgeny
2024-09-07 19:40:10 +01:00
committed by GitHub
parent 1839dab17b
commit 5ed701402b
8 changed files with 129 additions and 25 deletions
+4
View File
@@ -1000,6 +1000,10 @@ func apiChatRead(type: ChatType, id: Int64, itemRange: (Int64, Int64)) async thr
try await sendCommandOkResp(.apiChatRead(type: type, id: id, itemRange: itemRange))
}
func apiChatItemsRead(type: ChatType, id: Int64, itemIds: [Int64]) async throws {
try await sendCommandOkResp(.apiChatItemsRead(type: type, id: id, itemIds: itemIds))
}
func apiChatUnread(type: ChatType, id: Int64, unreadChat: Bool) async throws {
try await sendCommandOkResp(.apiChatUnread(type: type, id: id, unreadChat: unreadChat))
}