mirror of https://codeberg.org/cage/tinmop/
- fixed command: 'thread-go-to-parent-post'.
This commit is contained in:
parent
77249e97e3
commit
a118ce13de
|
@ -3637,12 +3637,20 @@ gemini client certificates!)."
|
||||||
:complete-fn #'complete:fediverse-account)))
|
:complete-fn #'complete:fediverse-account)))
|
||||||
|
|
||||||
(defun thread-go-to-parent-post ()
|
(defun thread-go-to-parent-post ()
|
||||||
"Select and move to th parent of the current selected post"
|
"Select and move to the parent of the current selected post"
|
||||||
(when-let* ((selected-row (line-oriented-window:selected-row-fields *thread-window*))
|
(when-let* ((timeline (thread-window:timeline-type *thread-window*))
|
||||||
(status-id (actual-author-message-id selected-row))
|
(folder (thread-window:timeline-folder *thread-window*))
|
||||||
(parent-row (db:get-parent-status-row status-id))
|
(selected-row (line-oriented-window:selected-row-fields *thread-window*))
|
||||||
(index (db:row-message-index parent-row))
|
(status-id (actual-author-message-id selected-row))
|
||||||
(event (make-instance 'thread-goto-message
|
;; NB: db:get-parent-status-row does not take into account the folder or timeline...
|
||||||
:payload index)))
|
(generic-parent-row (db:get-parent-status-row status-id))
|
||||||
(info-message (format nil "~a" index))
|
(generic-parent-id (db:row-message-status-id generic-parent-row))
|
||||||
|
;; ...so we need to call
|
||||||
|
;; db::find-status-id-folder-timeline to get the actual
|
||||||
|
;; row for the folder and timeline the user is reading...
|
||||||
|
(status-parent-row (db::find-status-id-folder-timeline generic-parent-id folder timeline))
|
||||||
|
;; ...and get the correct message index
|
||||||
|
(index (db:row-message-index status-parent-row))
|
||||||
|
(event (make-instance 'thread-goto-message
|
||||||
|
:payload index)))
|
||||||
(push-event event)))
|
(push-event event)))
|
||||||
|
|
Loading…
Reference in New Issue