diff options
author | wurstsalat <mailtrash@posteo.de> | 2022-10-09 13:11:48 +0300 |
---|---|---|
committer | wurstsalat <mailtrash@posteo.de> | 2022-10-09 13:11:48 +0300 |
commit | 61fec3e4037536c42fa3e83e4ad19f3ae1432ec2 (patch) | |
tree | 4ee53ef73be4405b8b69360cf2e5bfe934e683d2 | |
parent | c1e41f53afce030e18c0fc6cdc3dc575f65f42f7 (diff) |
cfix: AccountPage: React to avatar changes
-rw-r--r-- | gajim/gtk/account_page.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gajim/gtk/account_page.py b/gajim/gtk/account_page.py index 3fe62a2ee..ba8521a75 100644 --- a/gajim/gtk/account_page.py +++ b/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 @@ class AccountPage(Gtk.Box, EventHelper): 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 @@ class AccountPage(Gtk.Box, EventHelper): 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) |