1
0
Fork 0

-added new command: 'thread-go-to-parent-post'.

This commit is contained in:
cage 2024-04-04 15:45:47 +02:00
parent 07505754b4
commit 77249e97e3
3 changed files with 16 additions and 2 deletions

View File

@ -270,6 +270,8 @@
(status-id (db:row-message-status-id selected-row)))
(ui:info-message (format nil "ID: ~a" status-id))))
(define-key "^" #'thread-go-to-parent-post *thread-keymap*)
(define-key "/ b" #'thread-search-next-message-body *thread-keymap*)
(define-key "/ m" #'thread-search-next-message-meta *thread-keymap*)

View File

@ -3203,7 +3203,8 @@
:delete-notifications
:show-announcements
:show-parent-post
:switch-fediverse-account))
:switch-fediverse-account
:thread-go-to-parent-post))
(defpackage :scheduled-events
(:use

View File

@ -265,7 +265,7 @@
"Jump to message"
(flet ((on-input-complete (index)
(when-let* ((index-as-number (num:safe-parse-number index))
(event (make-instance 'thread-goto-message
(event (make-instance 'thread-goto-message
:payload index-as-number)))
(push-event event))))
(ask-string-input #'on-input-complete :prompt (_ "Jump to message: "))))
@ -3635,3 +3635,14 @@ gemini client certificates!)."
(ask-string-input #'on-input-complete
:prompt (_ "Switch to account: ")
:complete-fn #'complete:fediverse-account)))
(defun thread-go-to-parent-post ()
"Select and move to th parent of the current selected post"
(when-let* ((selected-row (line-oriented-window:selected-row-fields *thread-window*))
(status-id (actual-author-message-id selected-row))
(parent-row (db:get-parent-status-row status-id))
(index (db:row-message-index parent-row))
(event (make-instance 'thread-goto-message
:payload index)))
(info-message (format nil "~a" index))
(push-event event)))