Philipp Hörist pushed to branch master at gajim / gajim
Commits:
c5d5109f by lovetox at 2022-02-01T19:17:51+01:00
Fix typo
- - - - -
882bc501 by lovetox at 2022-02-01T21:31:30+01:00
Client: Notify when the stream is not resumeable
Modules use the state-changed signal to correctly handle connection loss
- - - - -
2 changed files:
- gajim/common/client.py
- gajim/common/const.py
Changes:
=====================================
gajim/common/client.py
=====================================
@@ -307,7 +307,9 @@ def _on_password(password: str) -> None:
self._schedule_reconnect()
app.ged.raise_event(ShowChanged(account=self._account,
show='error'))
- self.notify('state-changed', SimpleClientState.RESUME_IN_PREGRESS)
+ if not self._client.resumeable:
+ self.notify('state-changed', SimpleClientState.DISCONNECTED)
+ self.notify('state-changed', SimpleClientState.RESUME_IN_PROGRESS)
else:
app.ged.raise_event(ShowChanged(account=self._account,
=====================================
gajim/common/const.py
=====================================
@@ -306,7 +306,7 @@ def is_available(self):
class SimpleClientState(Enum):
DISCONNECTED = 'disconnected'
CONNECTED = 'connected'
- RESUME_IN_PREGRESS = 'resume-in-progress'
+ RESUME_IN_PROGRESS = 'resume-in-progress'
@property
def is_disconnected(self):
@@ -318,7 +318,7 @@ def is_connected(self):
@property
def is_resume_in_progress(self):
- return self == SimpleClientState.RESUME_IN_PREGRESS
+ return self == SimpleClientState.RESUME_IN_PROGRESS
class JingleState(Enum):
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/824672266d6deca5d0118908d85d15fd6c4af277...882bc501e347e41a148668411808702ce8477bf9
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/824672266d6deca5d0118908d85d15fd6c4af277...882bc501e347e41a148668411808702ce8477bf9
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits