Daniel Brötzmann pushed to branch mainwindow at gajim / gajim
Commits: 7109c973 by wurstsalat at 2021-09-25T16:04:56+02:00 Events: Retract events when disabling account
- - - - -
2 changed files:
- gajim/common/events.py - gajim/gui_interface.py
Changes:
===================================== gajim/common/events.py ===================================== @@ -190,6 +190,14 @@ def add_event(self, account, jid, event):
self.fire_event_added(event)
+ def remove_account_events(self, account): + if account not in self._events: + return + + account_events = self.get_events(account) + for jid, _events in account_events.items(): + self.remove_events(account, jid) + def remove_events(self, account, jid, event=None, types=None): """ If event is not specified, remove all events from this jid, optionally
===================================== gajim/gui_interface.py ===================================== @@ -1219,6 +1219,8 @@ def disable_account(self, account): 'account-disabled', account=account))
+ # app.events.remove_account_events(account) + if account == app.ZEROCONF_ACC_NAME: app.connections[account].disable_account() app.connections[account].cleanup()
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/7109c973b766508e2cc15df600b0e4a11...