mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-14 19:05:27 +00:00
android, desktop: fix crash on marking chat read (#4671)
This commit is contained in:
committed by
GitHub
parent
c72c461306
commit
cd1550a14d
+4
-1
@@ -472,7 +472,10 @@ fun ChatView(staleChatId: State<String?>, onComposed: suspend (chatId: String) -
|
||||
markRead = { range, unreadCountAfter ->
|
||||
withBGApi {
|
||||
withChats {
|
||||
markChatItemsRead(chatRh, chatInfo, range, unreadCountAfter)
|
||||
// It's important to call it on Main thread. Otherwise, composable crash occurs from time-to-time without useful stacktrace
|
||||
withContext(Dispatchers.Main) {
|
||||
markChatItemsRead(chatRh, chatInfo, range, unreadCountAfter)
|
||||
}
|
||||
ntfManager.cancelNotificationsForChat(chatInfo.id)
|
||||
chatModel.controller.apiChatRead(
|
||||
chatRh,
|
||||
|
||||
Reference in New Issue
Block a user