Fix idle detection

Fixes #9149
This commit is contained in:
Philipp Hörist 2018-05-27 10:51:40 +02:00
parent 70525c00d2
commit b749eccf51
2 changed files with 2 additions and 1 deletions

View File

@ -194,6 +194,7 @@ class IdleMonitor:
def is_available(self):
return self._idle_monitor is not None
@property
def state(self):
if not self.is_available():
return IdleState.UNKNOWN

View File

@ -1116,7 +1116,7 @@ class Interface:
app.block_signed_in_notifications[account] = True
connected = obj.conn.connected
if idle.Monitor.is_unknown() and connected in (2, 3):
if not idle.Monitor.is_unknown() and connected in (2, 3):
# we go online or free for chat, so we activate auto status
app.sleeper_state[account] = 'online'
elif not ((idle.Monitor.is_away() and connected == 4) or \