Skip to content
Snippets Groups Projects

Display a data waiting message only if any tracked account is present

Merged Jakub Ziebinski requested to merge jziebinski/fix-no-account-message into develop
All threads resolved!
Files
2
@@ -168,8 +168,8 @@ class BalanceStatsButton(DynamicOneLineButtonUnfocusable):
return asset_name_to_value[asset_name]
@CliveScreen.prevent_action_when_no_accounts_node_data()
@on(OneLineButton.Pressed, ".balance-button")
+2
@CliveScreen.prevent_action_when_no_accounts_node_data
def push_balance_screen(self) -> None:
if self._balance_type == "liquid":
self.app.push_screen(LiquidNavigationDialog(self._account, asset_type=self._asset_type))
@@ -228,7 +228,7 @@ class TrackedAccountInfo(Container, TrackedAccountReferencingWidget):
lambda: f"Account update: {humanize_datetime(self._account.data.last_account_update)}",
)
@CliveScreen.prevent_action_when_no_accounts_node_data
@CliveScreen.prevent_action_when_no_accounts_node_data()
@on(OneLineButton.Pressed, "#account-details-button")
def push_account_details_screen(self) -> None:
self.app.push_screen(AccountDetails(self._account))
@@ -313,20 +313,16 @@ class DashboardBase(BaseScreen):
await accounts_container.query("*").remove()
await accounts_container.mount_all(widgets_to_mount)
@CliveScreen.prevent_action_when_no_accounts_node_data
@CliveScreen.prevent_action_when_no_working_account()
@CliveScreen.prevent_action_when_no_accounts_node_data()
def action_operations(self) -> None:
if not self.has_working_account:
self.notify("Cannot perform operations without working account", severity="warning")
return
self.app.push_screen(Operations())
def action_config(self) -> None:
self.app.push_screen(Config())
@CliveScreen.prevent_action_when_no_tracked_accounts()
def action_switch_working_account(self) -> None:
if not self.profile.accounts.tracked:
self.notify("Cannot switch a working account without any account", severity="warning")
return
self.app.push_screen(SwitchWorkingAccountDialog())
def action_add_account(self) -> None:
Loading