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


Commits:
4356a030 by wurstsalat at 2023-07-23T21:42:17+02:00
fix: SearchView: Jump to message in correct chat

- - - - -
4cc71117 by wurstsalat at 2023-07-23T21:43:58+02:00
fix: SearchView: Display corrected message text

- - - - -


1 changed file:

- gajim/gtk/search_view.py


Changes:

=====================================
gajim/gtk/search_view.py
=====================================
@@ -328,12 +328,12 @@ def _get_date_from_timestamp(timestamp: float) -> 
datetime:
     def _on_row_activated(_listbox: SearchView, row: ResultRow) -> None:
         control = app.window.get_control()
         if control.has_active_chat():
-            if control.contact.jid == row.jid:
+            if control.contact.jid == row.remote_jid:
                 control.scroll_to_message(row.entitykey, row.timestamp)
                 return
 
         # Other chat or no control opened
-        jid = row.jid
+        jid = row.remote_jid
         chat_type = 'chat'
         if row.type == MessageType.GROUPCHAT:
             chat_type = 'groupchat'
@@ -380,6 +380,7 @@ class ResultRow(Gtk.ListBoxRow):
     def __init__(self, db_row: DbConversationJoinedData) -> None:
         Gtk.ListBoxRow.__init__(self)
 
+        print(db_row)
         self._client = self._get_client(db_row.account_jid)
         self.account = self._client.account
 
@@ -421,8 +422,12 @@ def __init__(self, db_row: DbConversationJoinedData) -> 
None:
         self._ui.row_time_label.set_label(date)
 
         assert db_row.message is not None
+        message = db_row.message
+        if db_row.correction is not None:
+            message = db_row.correction.message
+
         message_widget = MessageWidget(self.account, selectable=False)
-        message_widget.add_with_styling(db_row.message, nickname=contact_name)
+        message_widget.add_with_styling(message, nickname=contact_name)
         self._ui.result_row_grid.attach(message_widget, 1, 1, 2, 1)
 
         self.show_all()



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/4a98afa4a482db39190af9060b7649fd2d334cf3...4cc71117e7878e85281817a9654861ca9bb5bdc3

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/4a98afa4a482db39190af9060b7649fd2d334cf3...4cc71117e7878e85281817a9654861ca9bb5bdc3
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