1
0
Fork 0

- prevented crash in 'select-messages-corresponding-to-shown' when no message has been selected.

This commit is contained in:
cage 2024-07-06 14:10:11 +02:00
parent 39963e00b1
commit c2bbe94b2a
1 changed files with 8 additions and 7 deletions

View File

@ -888,13 +888,14 @@ db:renumber-timeline-message-index."
(defun select-messages-corresponding-to-shown ()
(multiple-value-bind (status-id timeline folder)
(get-status-tuple-shown-status *message-window*)
(let ((matching-status (db::find-status-id-folder-timeline status-id
folder
timeline)))
(if matching-status
(let ((new-message-index (db:row-message-index matching-status)))
(rebuild-lines *thread-window* new-message-index))
(ui:info-message (format nil (_ "No matching post in thread window")))))))
(when status-id
(let ((matching-status (db::find-status-id-folder-timeline status-id
folder
timeline)))
(if matching-status
(let ((new-message-index (db:row-message-index matching-status)))
(rebuild-lines *thread-window* new-message-index))
(ui:info-message (format nil (_ "No matching post in thread window"))))))))
(defmethod open-message ((object thread-window))
(with-accessors ((row-selected-index row-selected-index)