From 136921c0ada1d3b7c551708f9eaec74d264f7d6b Mon Sep 17 00:00:00 2001 From: Michal Iskierko Date: Tue, 12 Jul 2022 11:43:38 +0200 Subject: [PATCH] fix(@desktop): Fix crash when opening change status dialog Fixes #6415 --- src/app/modules/main/controller.nim | 3 --- src/app/modules/main/module.nim | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/app/modules/main/controller.nim b/src/app/modules/main/controller.nim index 57e4dbf398..3df6e40b69 100644 --- a/src/app/modules/main/controller.nim +++ b/src/app/modules/main/controller.nim @@ -306,9 +306,6 @@ proc getContactNameAndImage*(self: Controller, contactId: string): proc getContactDetails*(self: Controller, contactId: string): ContactDetails = return self.contactsService.getContactDetails(contactId) -proc getStatusForContact*(self: Controller, contactId: string): StatusUpdateDto = - return self.contactsService.getStatusForContactWithId(contactId) - proc resolveENS*(self: Controller, ensName: string, uuid: string = "", reason: string = "") = self.contactsService.resolveENS(ensName, uuid, reason) diff --git a/src/app/modules/main/module.nim b/src/app/modules/main/module.nim index 6287c9f76d..5df9335ad1 100644 --- a/src/app/modules/main/module.nim +++ b/src/app/modules/main/module.nim @@ -227,8 +227,6 @@ proc createChannelGroupItem[T](self: Module[T], c: ChannelGroupDto): SectionItem c.muted, c.members.map(proc(member: ChatMember): MemberItem = let contactDetails = self.controller.getContactDetails(member.id) - let statusUpdateDto = self.controller.getStatusForContact(member.id) - let status = statusUpdateDto.statusType.int result = initMemberItem( pubKey = member.id, displayName = contactDetails.displayName, @@ -736,7 +734,7 @@ method resolvedENS*[T](self: Module[T], publicKey: string, address: string, uuid method contactsStatusUpdated*[T](self: Module[T], statusUpdates: seq[StatusUpdateDto]) = for s in statusUpdates: - let status = OnlineStatus(s.statusType.int) + let status = toOnlineStatus(s.statusType) self.view.activeSection().setOnlineStatusForMember(s.publicKey, status) method contactUpdated*[T](self: Module[T], publicKey: string) =