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

Commits:

1 changed file:

Changes:

  • gajim/gtk/chat_list.py
    ... ... @@ -570,6 +570,10 @@ def __init__(self, workspace_id: str, account: str, jid: JID, type_: str,
    570 570
                 self.contact.connect('user-status-show-changed',
    
    571 571
                                      self._on_muc_user_update)
    
    572 572
     
    
    573
    +            self.contact.room.connect('room-left', self._on_muc_update)
    
    574
    +            self.contact.room.connect('room-destroyed', self._on_muc_update)
    
    575
    +            self.contact.room.connect('room-kicked', self._on_muc_update)
    
    576
    +
    
    573 577
             self.contact_name: str = self.contact.name
    
    574 578
             self.timestamp: float = 0
    
    575 579
             self.stanza_id: Optional[str] = None
    
    ... ... @@ -777,6 +781,13 @@ def _on_muc_user_update(self,
    777 781
                                 ) -> None:
    
    778 782
             self.update_avatar()
    
    779 783
     
    
    784
    +    def _on_muc_update(self,
    
    785
    +                       _contact: GroupchatContact,
    
    786
    +                       _signal_name: str,
    
    787
    +                       *args: Any
    
    788
    +                       ) -> None:
    
    789
    +        self.update_avatar()
    
    790
    +
    
    780 791
         def update_avatar(self) -> None:
    
    781 792
             scale = self.get_scale_factor()
    
    782 793
             surface = self.contact.get_avatar(AvatarSize.ROSTER, scale)
    
    ... ... @@ -908,6 +919,9 @@ def _on_state_flags_changed(self,
    908 919
     
    
    909 920
         def _on_destroy(self, _row: ChatRow) -> None:
    
    910 921
             self.contact.disconnect_all_from_obj(self)
    
    922
    +        if isinstance(self.contact, GroupchatParticipant):
    
    923
    +            self.contact.room.disconnect_all_from_obj(self)
    
    924
    +
    
    911 925
             app.check_finalize(self)
    
    912 926
     
    
    913 927
         def _on_close_button_clicked(self, _button: Gtk.Button) -> None: