None status fix
This commit is contained in:
parent
7708ce1d24
commit
a8c1bd188f
2 changed files with 6 additions and 4 deletions
|
@ -56,9 +56,10 @@ 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
|
||||
invoke_in_main_thread(self._profile.set_status, status)
|
||||
if status is not None:
|
||||
invoke_in_main_thread(self._profile.set_status, status)
|
||||
|
||||
def get_window(self):
|
||||
inst = self
|
||||
|
|
|
@ -68,9 +68,10 @@ 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
|
||||
invoke_in_main_thread(self._profile.set_status, status)
|
||||
if status is not None:
|
||||
invoke_in_main_thread(self._profile.set_status, status)
|
||||
|
||||
def get_window(self):
|
||||
inst = self
|
||||
|
|
Loading…
Reference in a new issue