Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
3de8b687 by wurstsalat at 2024-05-19T13:29:59+02:00
fix: ChatControl: Don't fail when trying to jump to deleted message
- - - - -
1 changed file:
- gajim/gtk/control.py
Changes:
=====================================
gajim/gtk/control.py
=====================================
@@ -186,12 +186,15 @@ def scroll_to_message(
) -> None:
row = self._scrolled_view.get_row_by_pk(pk)
if row is None:
+ m = app.storage.archive.get_message_with_pk(pk)
+ if m is None:
+ log.info('Message with pk %s was not found in DB', pk)
+ return
+
# Clear view and reload conversation around timestamp
self._scrolled_view.reset()
self._scrolled_view.block_signals(True)
messages: list[Message] = []
- m = app.storage.archive.get_message_with_pk(pk)
- assert m is not None
messages.append(m)
messages.extend(app.storage.archive.get_conversation_before_after(
self.contact.account, self.contact.jid, True, timestamp, 50))
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/3de8b68765e13c501c91fdaf1b3795cfe1132d7e
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/3de8b68765e13c501c91fdaf1b3795cfe1132d7e
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]