From cb79716fc26c0a8b2104b3e1c9135bb302067544 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Thu, 3 Nov 2022 23:00:34 +0100 Subject: [PATCH] Close sub-hardware screens on swipe back --- sbapp/main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sbapp/main.py b/sbapp/main.py index 1213c01..ebfee8e 100644 --- a/sbapp/main.py +++ b/sbapp/main.py @@ -508,7 +508,14 @@ class SidebandApp(MDApp): self.last_exit_event = time.time() else: - self.open_conversations(direction="right") + if self.root.ids.screen_manager.current == "hardware_rnode_screen": + self.close_sub_hardware_action() + elif self.root.ids.screen_manager.current == "hardware_modem_screen": + self.close_sub_hardware_action() + elif self.root.ids.screen_manager.current == "hardware_serial_screen": + self.close_sub_hardware_action() + else: + self.open_conversations(direction="right") return True