Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
61fec3e4 by wurstsalat at 2022-10-09T12:11:48+02:00
cfix: AccountPage: React to avatar changes

- - - - -


1 changed file:

- gajim/gtk/account_page.py


Changes:

=====================================
gajim/gtk/account_page.py
=====================================
@@ -14,6 +14,7 @@
 
 from __future__ import annotations
 
+from typing import Any
 from typing import Union
 
 from gi.repository import Gdk
@@ -57,6 +58,7 @@ def __init__(self, account: str) -> None:
         self._jid = app.get_jid_from_account(account)
         client = app.get_client(account)
         self._contact = client.get_module('Contacts').get_contact(self._jid)
+        self._contact.connect('avatar-update', self._on_avatar_update)
 
         self._ui = get_builder('account_page.ui')
         self.add(self._ui.paned)
@@ -104,6 +106,9 @@ def __init__(self, account: str) -> None:
     def _on_destroy(self, _widget: AccountPage) -> None:
         app.check_finalize(self)
 
+    def _on_avatar_update(self, *args: Any) -> None:
+        self.update()
+
     def _on_edit_profile(self, _button: Gtk.Button) -> None:
         open_window('ProfileWindow', account=self._account)
 



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

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