fix(@desktop): Fix crash when opening change status dialog

Fixes #6415
This commit is contained in:
Michal Iskierko 2022-07-12 11:43:38 +02:00 committed by Michał Iskierko
parent e41d73eae3
commit 136921c0ad
2 changed files with 1 additions and 6 deletions

View File

@ -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)

View File

@ -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) =