diff --git a/apps/ios/Shared/Model/ChatModel.swift b/apps/ios/Shared/Model/ChatModel.swift index 1e9205473d..c2004bc10b 100644 --- a/apps/ios/Shared/Model/ChatModel.swift +++ b/apps/ios/Shared/Model/ChatModel.swift @@ -612,6 +612,7 @@ final class ChatModel: ObservableObject { } else { addChat_(chat, at: 0) } + ChatTagsModel.shared.addPresetChatTags(chat.chatInfo, chat.chatStats) popChatCollector.throttlePopChat(chat.chatInfo.id, currentPosition: 0) } @@ -656,7 +657,6 @@ final class ChatModel: ObservableObject { updateChatInfo(cInfo) } else if addMissing { addChat(Chat(chatInfo: cInfo, chatItems: [])) - ChatTagsModel.shared.addPresetChatTags(cInfo, ChatStats()) } } 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 b7655a2d27..0d5e97caaf 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 @@ -458,6 +458,9 @@ object ChatModel { suspend fun addChat(chat: Chat) { chats.add(index = 0, chat) + if (secondaryContextFilter == null) { + addPresetChatTags(chat.chatInfo, chat.chatStats) + } popChatCollector.throttlePopChat(chat.remoteHostId, chat.id, currentPosition = 0) } @@ -519,7 +522,6 @@ object ChatModel { updateChatInfo(rhId, cInfo) } else if (addMissing) { addChat(Chat(remoteHostId = rhId, chatInfo = cInfo, chatItems = arrayListOf())) - addPresetChatTags(cInfo, Chat.ChatStats()) } }