mirror of
https://codeberg.org/cage/tinmop/
synced 2025-01-10 02:02:31 +01:00
-added new command: 'thread-go-to-parent-post'.
This commit is contained in:
parent
07505754b4
commit
77249e97e3
@ -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*)
|
||||
|
@ -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
|
||||
|
@ -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)))
|
||||
|
Loading…
Reference in New Issue
Block a user