None status fix

master
ingvar1995 8 years ago
parent 7708ce1d24
commit a8c1bd188f

@ -56,8 +56,9 @@ class AutoAwayStatusLinux(plugin_super_class.PluginSuperClass):
self.save_settings('{"time": ' + str(self._time) + '}')
def change_status(self, status=1):
if self._profile.status != 1:
if self._profile.status in (0, 2):
self._prev_status = self._profile.status
if status is not None:
invoke_in_main_thread(self._profile.set_status, status)
def get_window(self):

@ -68,8 +68,9 @@ class AutoAwayStatusWindows(plugin_super_class.PluginSuperClass):
self.save_settings('{"time": ' + str(self._time) + '}')
def change_status(self, status=1):
if self._profile.status != 1:
if self._profile.status in (0, 2):
self._prev_status = self._profile.status
if status is not None:
invoke_in_main_thread(self._profile.set_status, status)
def get_window(self):

Loading…
Cancel
Save