Philipp Hörist pushed to branch master at gajim / gajim


Commits:
f12cf65e by Philipp Hörist at 2022-10-09T13:38:51+02:00
fix: Don’t fail when disabling accounts

Fixes #11199

- - - - -


1 changed file:

- gajim/gui_interface.py


Changes:

=====================================
gajim/gui_interface.py
=====================================
@@ -563,6 +563,9 @@ def disable_account(self, account: str) -> None:
         build_accounts_menu()
         app.app.update_app_actions_state()
 
+        # Code in account-disabled handlers may use app.get_client()
+        app.ged.raise_event(AccountDisabled(account=account))
+
         app.get_client(account).cleanup()
         del app.connections[account]
         del self.instances[account]
@@ -570,8 +573,6 @@ def disable_account(self, account: str) -> None:
         del app.automatic_rooms[account]
         del app.to_be_removed[account]
 
-        app.ged.raise_event(AccountDisabled(account=account))
-
     def remove_account(self, account: str) -> None:
         if app.settings.get_account_setting(account, 'active'):
             self.disable_account(account)



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/f12cf65e8c44105b3689d5519583475142276a18

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/f12cf65e8c44105b3689d5519583475142276a18
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

Reply via email to