mirror of
https://github.com/markqvist/Sideband.git
synced 2025-05-07 08:54:57 -04:00
Stop service with app shutdown, but persist on UI close
This commit is contained in:
parent
bec6bda2f6
commit
8b275cbe7f
3 changed files with 31 additions and 15 deletions
|
@ -317,6 +317,12 @@ class SidebandApp(MDApp):
|
|||
self.sideband.setstate("app.foreground", False)
|
||||
|
||||
def final_exit(dt):
|
||||
RNS.log("Stopping service...")
|
||||
self.sideband.setstate("wants.service_stop", True)
|
||||
while self.sideband.service_available():
|
||||
time.sleep(0.2)
|
||||
RNS.log("Service stopped")
|
||||
|
||||
RNS.exit()
|
||||
MDApp.get_running_app().stop()
|
||||
Window.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue