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:
parent
686ebd619b
commit
fdd73cdd9d
@ -483,6 +483,8 @@
|
|||||||
|
|
||||||
(define-key "C-J" #'open-message-attach-perform-opening *open-attach-keymap*)
|
(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 "up" #'open-message-attach-go-up *open-attach-keymap*)
|
||||||
|
|
||||||
(define-key "down" #'open-message-attach-go-down *open-attach-keymap*)
|
(define-key "down" #'open-message-attach-go-down *open-attach-keymap*)
|
||||||
|
@ -2580,6 +2580,7 @@
|
|||||||
:compose-message
|
:compose-message
|
||||||
:reply-message
|
:reply-message
|
||||||
:open-message-attach
|
:open-message-attach
|
||||||
|
:open-all-message-attachments
|
||||||
:open-message-attach-go-up
|
:open-message-attach-go-up
|
||||||
:open-message-attach-go-down
|
:open-message-attach-go-down
|
||||||
:open-message-attach-perform-opening
|
:open-message-attach-perform-opening
|
||||||
|
@ -1138,6 +1138,15 @@ If some posts was deleted before, download them again."
|
|||||||
(open-attach-window:init (db:row-message-status-id selected-message))
|
(open-attach-window:init (db:row-message-status-id selected-message))
|
||||||
(focus-to-open-attach-window)))
|
(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)
|
(defun open-message-attach-move (amount)
|
||||||
(ignore-errors
|
(ignore-errors
|
||||||
(line-oriented-window:unselect-all *open-attach-window*)
|
(line-oriented-window:unselect-all *open-attach-window*)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user