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


Commits:
4c814696 by wurstsalat at 2023-07-23T21:20:49+02:00
fix: Don't merge message rows if message is corrected

- - - - -


1 changed file:

- gajim/gtk/conversation/rows/message.py


Changes:

=====================================
gajim/gtk/conversation/rows/message.py
=====================================
@@ -68,6 +68,7 @@ def __init__(self,
         self.set_selectable(True)
         self.type = 'chat'
         self._contact = contact
+        self._db_row = db_row
 
         self._avatar_box = AvatarBox(contact)
 
@@ -91,6 +92,8 @@ def from_db_row(cls,
         return cls(contact, db_row)
 
     def update_with_content(self, db_row: DbConversationJoinedData) -> None:
+        self._db_row = db_row
+
         self.set_merged(False)
         self.get_style_context().remove_class('retracted-message')
         self.get_style_context().remove_class('gajim-mention-highlight')
@@ -333,6 +336,8 @@ def is_mergeable(self, message: MessageRow) -> bool:
             return False
         if not self.is_same_securitylabels(message):
             return False
+        if self._db_row.correction is not None:
+            return False
         return abs(message.timestamp - self.timestamp) < MERGE_TIMEFRAME
 
     def get_text(self) -> str:



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/4c814696003d3baa9418e6f624f01aa946129546

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