Skip to content

Commit d7bd3fd

Browse files
committed
fix(app_search): update ctrl+k menu when chat color changes or is left
Fixes #18630 and 18631
1 parent 214f5b3 commit d7bd3fd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/app/modules/main/app_search/controller.nim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ proc init*(self: Controller) =
6464
var args = ChatUpdateArgs(e)
6565
self.delegate.updateChatItems(args.chats)
6666

67+
self.events.on(SIGNAL_COMMUNITY_CHANNEL_EDITED) do(e: Args):
68+
let args = CommunityChatArgs(e)
69+
self.delegate.updateChatItems(@[args.chat])
70+
6771
self.events.on(SIGNAL_CONTACT_UPDATED) do(e: Args):
6872
let args = ContactArgs(e)
6973
self.delegate.contactUpdated(args.contactId)
@@ -85,6 +89,10 @@ proc init*(self: Controller) =
8589
let args = CommunityChatIdArgs(e)
8690
self.delegate.chatRemoved(args.chatId)
8791

92+
self.events.on(SIGNAL_CHAT_LEFT) do(e:Args):
93+
let args = ChatArgs(e)
94+
self.delegate.chatRemoved(args.chatId)
95+
8896
self.events.on(SIGNAL_SENDING_SUCCESS) do(e:Args):
8997
let args = MessageSendingSuccess(e)
9098
self.delegate.updateLastMessage(args.chat.id, args.chat.communityId, args.chat.chatType, args.chat.lastMessage)

0 commit comments

Comments
 (0)