qt addresses list: add "funded or unused" filter option
This commit is contained in:
@@ -43,6 +43,7 @@ class AddressUsageStateFilter(IntEnum):
|
|||||||
UNUSED = 1
|
UNUSED = 1
|
||||||
FUNDED = 2
|
FUNDED = 2
|
||||||
USED_AND_EMPTY = 3
|
USED_AND_EMPTY = 3
|
||||||
|
FUNDED_OR_UNUSED = 4
|
||||||
|
|
||||||
def ui_text(self) -> str:
|
def ui_text(self) -> str:
|
||||||
return {
|
return {
|
||||||
@@ -50,6 +51,7 @@ class AddressUsageStateFilter(IntEnum):
|
|||||||
self.UNUSED: _('Unused'),
|
self.UNUSED: _('Unused'),
|
||||||
self.FUNDED: _('Funded'),
|
self.FUNDED: _('Funded'),
|
||||||
self.USED_AND_EMPTY: _('Used'),
|
self.USED_AND_EMPTY: _('Used'),
|
||||||
|
self.FUNDED_OR_UNUSED: _('Funded or Unused'),
|
||||||
}[self]
|
}[self]
|
||||||
|
|
||||||
|
|
||||||
@@ -173,6 +175,8 @@ class AddressList(MyTreeView):
|
|||||||
continue
|
continue
|
||||||
if self.show_used == AddressUsageStateFilter.USED_AND_EMPTY and not is_used_and_empty:
|
if self.show_used == AddressUsageStateFilter.USED_AND_EMPTY and not is_used_and_empty:
|
||||||
continue
|
continue
|
||||||
|
if self.show_used == AddressUsageStateFilter.FUNDED_OR_UNUSED and is_used_and_empty:
|
||||||
|
continue
|
||||||
balance_text = self.parent.format_amount(balance, whitespaces=True)
|
balance_text = self.parent.format_amount(balance, whitespaces=True)
|
||||||
# create item
|
# create item
|
||||||
if fx and fx.get_fiat_address_config():
|
if fx and fx.get_fiat_address_config():
|
||||||
|
|||||||
Reference in New Issue
Block a user