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


Commits:
8d59f3a6 by wurstsalat at 2024-09-09T22:36:05+02:00
cfix: ContactNameWidget: Fix updating name for GroupchatParticipant

Fixes #11977

- - - - -


1 changed file:

- gajim/gtk/contact_name_widget.py


Changes:

=====================================
gajim/gtk/contact_name_widget.py
=====================================
@@ -147,13 +147,15 @@ def enable_edit_mode(self) -> None:
 
     def update_displayed_name(self, name: str) -> None:
         if self._contact is not None:
-            assert isinstance(self._contact, BareContact | GroupchatContact)
-            # Name editing is not possible for GroupchatParticipant
-            if name == '':
-                name = self._contact.original_name
-
-            if name != self._contact.original_name:
-                name = f'{name} ({self._contact.original_name})'
+            if isinstance(self._contact, BareContact | GroupchatContact):
+                # Name editing is not possible for GroupchatParticipant
+                if name == '':
+                    name = self._contact.original_name
+
+                if name != self._contact.original_name:
+                    name = f'{name} ({self._contact.original_name})'
+            else:
+                name = self._contact.name
 
         self._entry.set_text(name)
 



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/8d59f3a65ca3bfcad5e7c78bb77114c61e6df542

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/8d59f3a65ca3bfcad5e7c78bb77114c61e6df542
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to