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 () (defun select-messages-corresponding-to-shown ()
(multiple-value-bind (status-id timeline folder) (multiple-value-bind (status-id timeline folder)
(get-status-tuple-shown-status *message-window*) (get-status-tuple-shown-status *message-window*)
(let ((matching-status (db::find-status-id-folder-timeline status-id (when status-id
folder (let ((matching-status (db::find-status-id-folder-timeline status-id
timeline))) folder
(if matching-status timeline)))
(let ((new-message-index (db:row-message-index matching-status))) (if matching-status
(rebuild-lines *thread-window* new-message-index)) (let ((new-message-index (db:row-message-index matching-status)))
(ui:info-message (format nil (_ "No matching post in thread window"))))))) (rebuild-lines *thread-window* new-message-index))
(ui:info-message (format nil (_ "No matching post in thread window"))))))))
(defmethod open-message ((object thread-window)) (defmethod open-message ((object thread-window))
(with-accessors ((row-selected-index row-selected-index) (with-accessors ((row-selected-index row-selected-index)