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


Commits:
65a137e8 by wurstsalat at 2022-01-29T00:57:02+01:00
GroupchatDetails: Update GroupchatInfo on disco update

- - - - -


1 changed file:

- gajim/gtk/groupchat_details.py


Changes:

=====================================
gajim/gtk/groupchat_details.py
=====================================
@@ -91,6 +91,9 @@ def __init__(self,
 
     def _on_muc_disco_update(self, event: MucDiscoUpdate) -> None:
         self._ui.name_entry.set_text(self._contact.name)
+        disco_info = self._contact.get_disco()
+        assert disco_info is not None
+        self._groupchat_info.set_from_disco_info(disco_info)
 
     def _on_stack_child_changed(self,
                                 _widget: Gtk.Stack,
@@ -129,14 +132,14 @@ def _add_groupchat_manage(self) -> None:
         self._ui.manage_box.add(self._groupchat_manage)
 
     def _add_groupchat_info(self) -> None:
-        # TODO: Update avatar on update
-        groupchat_info = GroupChatInfoScrolled(self._contact.account, 
width=600)
-        groupchat_info.set_halign(Gtk.Align.FILL)
+        self._groupchat_info = GroupChatInfoScrolled(
+            self._contact.account, width=600)
+        self._groupchat_info.set_halign(Gtk.Align.FILL)
         disco_info = self._contact.get_disco()
         assert disco_info is not None
-        groupchat_info.set_from_disco_info(disco_info)
-        groupchat_info.set_subject(self._contact.subject)
-        self._ui.info_box.add(groupchat_info)
+        self._groupchat_info.set_from_disco_info(disco_info)
+        self._groupchat_info.set_subject(self._contact.subject)
+        self._ui.info_box.add(self._groupchat_info)
 
     def _add_groupchat_settings(self) -> None:
         scrolled_window = Gtk.ScrolledWindow()



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

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