From d1b48e583e09e8150f72c4b9e31e6e6cda501368 Mon Sep 17 00:00:00 2001 From: Avently <7953703+avently@users.noreply.github.com> Date: Sat, 10 Aug 2024 12:44:36 +0900 Subject: [PATCH] don't throttle own messages on desktop --- .../kotlin/chat/simplex/common/model/ChatModel.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt index 78c34e2e2d..b37da078dd 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt @@ -305,7 +305,12 @@ object ChatModel { else chat.chatStats ) - popChatCollector.addChat(chat.remoteHostId, chat.id) + if (appPlatform.isDesktop && cItem.chatDir.sent) { + chat.popTs = Clock.System.now() + chats.add(0, chats.removeAt(i)) + } else { + popChatCollector.addChat(chat.remoteHostId, chat.id) + } } else { addChat(Chat(remoteHostId = rhId, chatInfo = cInfo, chatItems = arrayListOf(cItem))) }