1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-02-04 04:47:34 +01:00

- added a command to open all the attachments of a post.

This commit is contained in:
cage 2021-09-09 18:27:32 +02:00
parent 686ebd619b
commit fdd73cdd9d
3 changed files with 12 additions and 0 deletions

View File

@ -483,6 +483,8 @@
(define-key "C-J" #'open-message-attach-perform-opening *open-attach-keymap*)
(define-key "a" #'open-all-message-attachments *open-attach-keymap*)
(define-key "up" #'open-message-attach-go-up *open-attach-keymap*)
(define-key "down" #'open-message-attach-go-down *open-attach-keymap*)

View File

@ -2580,6 +2580,7 @@
:compose-message
:reply-message
:open-message-attach
:open-all-message-attachments
:open-message-attach-go-up
:open-message-attach-go-down
:open-message-attach-perform-opening

View File

@ -1138,6 +1138,15 @@ If some posts was deleted before, download them again."
(open-attach-window:init (db:row-message-status-id selected-message))
(focus-to-open-attach-window)))
(defun open-all-message-attachments ()
(when-let* ((win *thread-window*)
(selected-message (line-oriented-window:selected-row-fields win))
(status-id (db:row-message-status-id selected-message))
(attachment-urls (db:all-attachments-urls-to-status status-id
:add-reblogged-urls t)))
(loop for attachment-url in attachment-urls do
(open-attach-window:open-attachment attachment-url))))
(defun open-message-attach-move (amount)
(ignore-errors
(line-oriented-window:unselect-all *open-attach-window*)