Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
-
61fec3e4
by wurstsalat at 2022-10-09T12:11:48+02:00
1 changed file:
Changes:
| ... | ... | @@ -14,6 +14,7 @@ |
| 14 | 14 | |
| 15 | 15 | from __future__ import annotations
|
| 16 | 16 | |
| 17 | +from typing import Any
|
|
| 17 | 18 | from typing import Union
|
| 18 | 19 | |
| 19 | 20 | from gi.repository import Gdk
|
| ... | ... | @@ -57,6 +58,7 @@ def __init__(self, account: str) -> None: |
| 57 | 58 | self._jid = app.get_jid_from_account(account)
|
| 58 | 59 | client = app.get_client(account)
|
| 59 | 60 | self._contact = client.get_module('Contacts').get_contact(self._jid)
|
| 61 | + self._contact.connect('avatar-update', self._on_avatar_update)
|
|
| 60 | 62 | |
| 61 | 63 | self._ui = get_builder('account_page.ui')
|
| 62 | 64 | self.add(self._ui.paned)
|
| ... | ... | @@ -104,6 +106,9 @@ def __init__(self, account: str) -> None: |
| 104 | 106 | def _on_destroy(self, _widget: AccountPage) -> None:
|
| 105 | 107 | app.check_finalize(self)
|
| 106 | 108 | |
| 109 | + def _on_avatar_update(self, *args: Any) -> None:
|
|
| 110 | + self.update()
|
|
| 111 | + |
|
| 107 | 112 | def _on_edit_profile(self, _button: Gtk.Button) -> None:
|
| 108 | 113 | open_window('ProfileWindow', account=self._account)
|
| 109 | 114 |