diff --git a/src/app/modules/main/profile_section/contacts/controller.nim b/src/app/modules/main/profile_section/contacts/controller.nim index 9ef1a26a97..154771ee21 100644 --- a/src/app/modules/main/profile_section/contacts/controller.nim +++ b/src/app/modules/main/profile_section/contacts/controller.nim @@ -34,18 +34,22 @@ method delete*[T](self: Controller[T]) = method init*[T](self: Controller[T]) = self.events.on("contactAdded") do(e: Args): + self.contactsService.fetchContacts() let contacts = self.getContacts() self.delegate.setContactList(contacts) self.events.on("contactBlocked") do(e: Args): + self.contactsService.fetchContacts() let contacts = self.getContacts() self.delegate.setContactList(contacts) self.events.on("contactUnblocked") do(e: Args): + self.contactsService.fetchContacts() let contacts = self.getContacts() self.delegate.setContactList(contacts) self.events.on("contactRemoved") do(e: Args): + self.contactsService.fetchContacts() let contacts = self.getContacts() self.delegate.setContactList(contacts) diff --git a/src/app_service/service/contacts/service.nim b/src/app_service/service/contacts/service.nim index dfac872dcd..f541ff01b3 100644 --- a/src/app_service/service/contacts/service.nim +++ b/src/app_service/service/contacts/service.nim @@ -40,7 +40,7 @@ QtObject: result.threadpool = threadpool result.contacts = initTable[string, ContactsDto]() - proc fetchContacts(self: Service) = + proc fetchContacts*(self: Service) = try: let response = status_contacts.getContacts()