Improved lifecycle management on Android

This commit is contained in:
Mark Qvist 2022-09-17 17:21:16 +02:00
parent 1b8bb58683
commit 23a2a95784

View File

@ -253,10 +253,15 @@ class SidebandApp(MDApp):
w.height, w.size_hint_y, w.opacity, w.disabled = 0, None, 0, True w.height, w.size_hint_y, w.opacity, w.disabled = 0, None, 0, True
def quit_action(self, sender): def quit_action(self, sender):
RNS.exit() self.root.ids.nav_drawer.set_state("closed")
RNS.log("RNS shutdown complete") self.sideband.should_persist_data()
MDApp.get_running_app().stop()
Window.close() def final_exit(dt):
RNS.exit()
MDApp.get_running_app().stop()
Window.close()
Clock.schedule_once(final_exit, 0.5)
def announce_now_action(self, sender=None): def announce_now_action(self, sender=None):
self.sideband.lxmf_announce() self.sideband.lxmf_announce()