Philipp Hörist pushed to branch master at gajim / gajim
Commits: bab39049 by lovetox at 2022-02-02T23:34:41+01:00 Add SimpleClientState.CONNECTING
- - - - -
2 changed files:
- gajim/common/client.py - gajim/common/const.py
Changes:
===================================== gajim/common/client.py ===================================== @@ -561,6 +561,7 @@ def connect(self, ignored_tls_errors: IgnoredTlsErrorsT = None) -> None: self._reconnect = True self._disable_reconnect_timer() self._set_state(ClientState.CONNECTING) + self.notify('state-changed', SimpleClientState.CONNECTING)
if warn_about_plain_connection(self._account, self._client.connection_types):
===================================== gajim/common/const.py ===================================== @@ -304,18 +304,23 @@ def is_available(self):
class SimpleClientState(Enum): + CONNECTING = 'connecting' DISCONNECTED = 'disconnected' CONNECTED = 'connected' RESUME_IN_PROGRESS = 'resume-in-progress'
@property - def is_disconnected(self): - return self == SimpleClientState.DISCONNECTED + def is_connecting(self): + return self == SimpleClientState.CONNECTING
@property def is_connected(self): return self == SimpleClientState.CONNECTED
+ @property + def is_disconnected(self): + return self == SimpleClientState.DISCONNECTED + @property def is_resume_in_progress(self): return self == SimpleClientState.RESUME_IN_PROGRESS
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/bab39049531ea50ff488035b134ef30ca...