Philipp Hörist pushed to branch master at gajim / gajim
Commits:
7bb24f15 by Philipp Hörist at 2024-05-30T11:32:57+02:00
cfix: SearchView: Separate chats correctly
- - - - -
1 changed file:
- gajim/gtk/search_view.py
Changes:
=====================================
gajim/gtk/search_view.py
=====================================
@@ -80,7 +80,7 @@ def _header_func(row: ResultRow, before: ResultRow | None) ->
None:
row.set_header(RowHeader(
row.account, row.remote_jid, row.timestamp))
else:
- if before.jid != row.jid:
+ if before.remote_jid != row.remote_jid:
row.set_header(RowHeader(
row.account, row.remote_jid, row.timestamp))
elif before.local_timestamp.date() != row.local_timestamp.date():
@@ -388,9 +388,9 @@ def __init__(self, db_row: Message) -> None:
self.remote_jid = db_row.remote.jid
self.direction = ChatDirection(db_row.direction)
- self.jid = db_row.remote.jid
+ jid = db_row.remote.jid
if (db_row.direction == ChatDirection.OUTGOING):
- self.jid = JID.from_string(self._client.get_own_jid().bare)
+ jid = JID.from_string(self._client.get_own_jid().bare)
self.pk = db_row.pk
self.timestamp = db_row.timestamp
@@ -399,7 +399,7 @@ def __init__(self, db_row: Message) -> None:
self.type = MessageType(db_row.type)
self.contact = self._client.get_module('Contacts').get_contact(
- self.jid, groupchat=self.type == MessageType.GROUPCHAT)
+ jid, groupchat=self.type == MessageType.GROUPCHAT)
assert isinstance(
self.contact,
BareContact | GroupchatContact | GroupchatParticipant)
@@ -410,7 +410,7 @@ def __init__(self, db_row: Message) -> None:
contact_name = self.contact.name
if self.type == MessageType.GROUPCHAT:
- contact_name = db_row.resource
+ contact_name = db_row.resource or self.remote_jid.localpart
assert contact_name is not None
self._ui.row_name_label.set_text(contact_name)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/7bb24f15f180b5e85ebe4056e097b3c162b379e6
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/7bb24f15f180b5e85ebe4056e097b3c162b379e6
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]