From a2e8b6ebd7708e3612aa36c535c1be2921c1213e Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 2 Apr 2024 17:36:19 +0300 Subject: [PATCH] fix(wallet) start a session in case of tmp activity models Closes: #14250 --- .../main/wallet_section/activity/controller.nim | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/modules/main/wallet_section/activity/controller.nim b/src/app/modules/main/wallet_section/activity/controller.nim index 7540cb9d48..94788c3326 100644 --- a/src/app/modules/main/wallet_section/activity/controller.nim +++ b/src/app/modules/main/wallet_section/activity/controller.nim @@ -423,7 +423,8 @@ QtObject: self.updateAssetsIdentities() - proc setFilterAddresses*(self: Controller, addresses: seq[string], allAddressesSelected: bool) = + # Requires self.newFilterSession() to be called after this + proc setFilterAddresses(self: Controller, addresses: seq[string], allAddressesSelected: bool) = self.addresses = addresses self.allAddressesSelected = allAddressesSelected self.status.setIsFilterDirty(true) @@ -443,10 +444,13 @@ QtObject: self.setFilterAddresses(addresses, allAddressesSelected) + # Every change of addresses have to start a new session to get incremental updates when filter is cleared + self.newFilterSession() + proc setFilterToAddresses*(self: Controller, addresses: seq[string]) = self.currentActivityFilter.counterpartyAddresses = addresses - proc setFilterChains*(self: Controller, chainIds: seq[int], allEnabled: bool) = + proc setFilterChains(self: Controller, chainIds: seq[int], allEnabled: bool) = self.chainIds = chainIds self.status.setIsFilterDirty(true) self.status.emitFilterChainsChanged() @@ -469,6 +473,9 @@ QtObject: self.setFilterChains(chains, allChainsSelected) + # Every change of chains have to start a new session to get incremental updates when filter is cleared + self.newFilterSession() + proc updateRecipientsModel*(self: Controller) {.slot.} = self.status.setLoadingRecipients(true) # Recipients don't change with filers so we can use the same request id