Call to account.setOffline when closing the app to notify everyone about it

This commit is contained in:
Manuel Cortez 2018-12-10 13:25:30 -06:00
parent bbee451f2c
commit cca89f9260

View File

@ -230,6 +230,7 @@ class Controller(object):
def exit(self, *args, **kwargs):
log.debug("Receibed an exit signal. closing...")
self.set_offline()
self.disconnect_events()
self.window.Destroy()
wx.GetApp().ExitMainLoop()
@ -422,6 +423,12 @@ class Controller(object):
except:
log.error("Error in setting online for the current user")
def set_offline(self):
try:
r = self.session.vk.client.account.setOffline()
except:
log.error("Error in setting offline status for the current user")
def create_unread_messages(self):
try:
log.debug("Getting possible unread messages.")