diff --git a/src/app/modules/main/chat_section/module.nim b/src/app/modules/main/chat_section/module.nim index 34c0d8d6ff0..26cd3c29c9c 100644 --- a/src/app/modules/main/chat_section/module.nim +++ b/src/app/modules/main/chat_section/module.nim @@ -882,7 +882,7 @@ method onCategoryNameChanged*(self: Module, category: Category) = self.view.chatsModel().renameCategory(category.id, category.name) method onCommunityChannelDeletedOrChatLeft*(self: Module, chatId: string) = - if(not self.chatContentModules.contains(chatId)): + if not self.chatContentModules.contains(chatId): return self.view.chatsModel().removeItemById(chatId) self.removeSubmodule(chatId) @@ -1197,6 +1197,7 @@ method blockContact*(self: Module, publicKey: string) = method onContactBlocked*(self: Module, publicKey: string) = self.view.contactRequestsModel().removeItemById(publicKey) self.view.chatsModel().changeBlockedOnItemById(publicKey, blocked=true) + self.onCommunityChannelDeletedOrChatLeft(publicKey) method onContactUnblocked*(self: Module, publicKey: string) = self.view.chatsModel().changeBlockedOnItemById(publicKey, blocked=false) diff --git a/src/app_service/service/chat/service.nim b/src/app_service/service/chat/service.nim index 3ec1d2b8e7a..708da8fe12d 100644 --- a/src/app_service/service/chat/service.nim +++ b/src/app_service/service/chat/service.nim @@ -84,9 +84,6 @@ type role*: MemberRole joined*: bool - RpcResponseArgs* = ref object of Args - response*: RpcResponse[JsonNode] - CheckChannelPermissionsResponseArgs* = ref object of Args communityId*: string chatId*: string @@ -120,7 +117,6 @@ const SIGNAL_CHAT_MEMBER_UPDATED* = "chatMemberUpdated" const SIGNAL_CHAT_SWITCH_TO_OR_CREATE_1_1_CHAT* = "switchToOrCreateOneToOneChat" const SIGNAL_CHAT_ADDED_OR_UPDATED* = "chatAddedOrUpdated" const SIGNAL_CHAT_CREATED* = "chatCreated" -const SIGNAL_CHAT_REQUEST_UPDATE_AFTER_SEND* = "chatRequestUpdateAfterSend" const SIGNAL_CHECK_CHANNEL_PERMISSIONS_RESPONSE* = "checkChannelPermissionsResponse" const SIGNAL_CHECK_ALL_CHANNELS_PERMISSIONS_RESPONSE* = "checkAllChannelsPermissionsResponse" const SIGNAL_CHECK_ALL_CHANNELS_PERMISSIONS_FAILED* = "checkAllChannelsPermissionsFailed" @@ -183,10 +179,6 @@ QtObject: for clearedHistoryDto in receivedData.clearedHistories: self.events.emit(SIGNAL_CHAT_HISTORY_CLEARED, ChatArgs(chatId: clearedHistoryDto.chatId)) - self.events.on(SIGNAL_CHAT_REQUEST_UPDATE_AFTER_SEND) do(e: Args): - var args = RpcResponseArgs(e) - discard self.processMessengerResponse(args.response) - proc asyncGetActiveChats*(self: Service) = let arg = AsyncGetActiveChatsTaskArg( tptr: asyncGetActiveChatsTask, diff --git a/src/app_service/service/contacts/service.nim b/src/app_service/service/contacts/service.nim index 37b5b00cdfc..7a32927fc25 100644 --- a/src/app_service/service/contacts/service.nim +++ b/src/app_service/service/contacts/service.nim @@ -52,9 +52,6 @@ type publicKey*: string ok*: bool - RpcResponseArgs* = ref object of Args - response*: RpcResponse[JsonNode] - AppendChatMessagesArgs* = ref object of Args chatId*: string messages*: JsonNode @@ -395,9 +392,9 @@ QtObject: if self.contacts.hasKey(publicKey): if self.contacts[publicKey].dto.added and not self.contacts[publicKey].dto.removed and contact.added and not contact.removed: signal = SIGNAL_CONTACT_UPDATED - if contact.removed: - singletonInstance.globalEvents.showContactRemoved("Contact removed", fmt "You removed {contact.displayName} as a contact", contact.id) - signal = SIGNAL_CONTACT_REMOVED + if contact.removed and not self.contacts[publicKey].dto.removed: + singletonInstance.globalEvents.showContactRemoved("Contact removed", fmt "You removed {contact.displayName} as a contact", contact.id) + signal = SIGNAL_CONTACT_REMOVED self.contacts[publicKey] = self.constructContactDetails(contact) self.events.emit(signal, ContactArgs(contactId: publicKey)) diff --git a/src/backend/contacts.nim b/src/backend/contacts.nim index 74abaf4eafa..d0b35311897 100644 --- a/src/backend/contacts.nim +++ b/src/backend/contacts.nim @@ -9,7 +9,7 @@ proc getContacts*(): RpcResponse[JsonNode] = result = callPrivateRPC("contacts".prefix, payload) proc blockContact*(id: string): RpcResponse[JsonNode] = - result = callPrivateRPC("blockContactDesktop".prefix, %* [id]) + result = callPrivateRPC("blockContact".prefix, %* [id]) proc unblockContact*(id: string): RpcResponse[JsonNode] = result = callPrivateRPC("unblockContact".prefix, %* [id]) diff --git a/vendor/status-go b/vendor/status-go index e6c2f89f034..3b0601428b4 160000 --- a/vendor/status-go +++ b/vendor/status-go @@ -1 +1 @@ -Subproject commit e6c2f89f03479e0dfd80226f68d51ffc3dd1a2b4 +Subproject commit 3b0601428b4b65b8aedea5e859d7d10ddcf35484