Improved navigation

This commit is contained in:
Mark Qvist 2024-06-01 01:12:10 +02:00
parent e64e3b6627
commit 3bf13d7435
2 changed files with 11 additions and 5 deletions

View File

@ -935,7 +935,10 @@ class SidebandApp(MDApp):
if text == "w":
if self.root.ids.screen_manager.current == "conversations_screen":
if self.include_conversations and not self.include_objects:
self.quit_action(self)
else:
self.conversations_action(direction="right")
elif self.root.ids.screen_manager.current == "map_settings_screen":
self.close_sub_map_action()
elif self.root.ids.screen_manager.current == "object_details_screen":
@ -1013,6 +1016,9 @@ class SidebandApp(MDApp):
# Handle escape/back
if key == 27:
if self.root.ids.screen_manager.current == "conversations_screen":
if not self.include_conversations and self.include_objects:
self.conversations_action(direction="right")
else:
if time.time() - self.last_exit_event < 2:
self.quit_action(self)
else:

View File

@ -62,7 +62,7 @@ MDNavigationLayout:
OneLineIconListItem:
text: "Objects"
text: "Objects & Devices"
on_release: root.ids.screen_manager.app.objects_action(self)
# _no_ripple_effect: True