Skip to content
Snippets Groups Projects
Commit 576148bc authored by Mateusz Żebrak's avatar Mateusz Żebrak Committed by Mateusz Kudela
Browse files

Dialogs should dismiss instead of pop_screen

parent a4a96a43
No related branches found
No related tags found
2 merge requests!600v1.27.5.21 Release,!567Show dialogs instead of operation summary screens
...@@ -31,4 +31,4 @@ class AddTrackedAccountDialog(CliveActionDialog): ...@@ -31,4 +31,4 @@ class AddTrackedAccountDialog(CliveActionDialog):
async def save_account(self) -> None: async def save_account(self) -> None:
is_account_saved = await self._add_account_container.save_account() is_account_saved = await self._add_account_container.save_account()
if is_account_saved: if is_account_saved:
self.app.pop_screen() self.dismiss()
...@@ -130,7 +130,7 @@ class CliveActionDialog(CliveBaseDialog[ScreenResultT], ABC): ...@@ -130,7 +130,7 @@ class CliveActionDialog(CliveBaseDialog[ScreenResultT], ABC):
@on(CancelOneLineButton.Pressed) @on(CancelOneLineButton.Pressed)
def action_cancel(self) -> None: def action_cancel(self) -> None:
self.app.pop_screen() self.dismiss()
class CliveInfoDialog(CliveBaseDialog[None], ABC): class CliveInfoDialog(CliveBaseDialog[None], ABC):
...@@ -141,4 +141,4 @@ class CliveInfoDialog(CliveBaseDialog[None], ABC): ...@@ -141,4 +141,4 @@ class CliveInfoDialog(CliveBaseDialog[None], ABC):
@on(CloseOneLineButton.Pressed) @on(CloseOneLineButton.Pressed)
def action_close(self) -> None: def action_close(self) -> None:
self.app.pop_screen() self.dismiss()
...@@ -31,4 +31,4 @@ class MarkAlarmAsHarmlessDialog(ConfirmActionDialog): ...@@ -31,4 +31,4 @@ class MarkAlarmAsHarmlessDialog(ConfirmActionDialog):
self._alarm.is_harmless = True self._alarm.is_harmless = True
self.notify(f"Alarm `{self.alarm_info}` was marked as harmless.") self.notify(f"Alarm `{self.alarm_info}` was marked as harmless.")
self.app.trigger_profile_watchers() self.app.trigger_profile_watchers()
self.app.pop_screen() self.dismiss()
...@@ -32,4 +32,4 @@ class SwitchWorkingAccountDialog(CliveActionDialog): ...@@ -32,4 +32,4 @@ class SwitchWorkingAccountDialog(CliveActionDialog):
@on(CliveActionDialog.Confirmed) @on(CliveActionDialog.Confirmed)
def confirm_selected_working_account(self) -> None: def confirm_selected_working_account(self) -> None:
self._switch_working_account_container.confirm_selected_working_account() self._switch_working_account_container.confirm_selected_working_account()
self.app.pop_screen() self.dismiss()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment