diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-06-04 12:08:46 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-06-04 12:08:46 +0200 |
commit | 7d27e4d5ff7f2e5c330f23ec119b6aeca30031e3 (patch) | |
tree | 51625293142a01773349ee766fee870881f2d794 /lisp/mastodon-media.el | |
parent | 5964ad1703bf04010d46497b27b388e1b0057883 (diff) |
move toggle sensitive image to tl and give it a binding
Diffstat (limited to 'lisp/mastodon-media.el')
-rw-r--r-- | lisp/mastodon-media.el | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lisp/mastodon-media.el b/lisp/mastodon-media.el index 8da9bb5..9827ab8 100644 --- a/lisp/mastodon-media.el +++ b/lisp/mastodon-media.el @@ -38,7 +38,6 @@ (require 'image-mode) (autoload 'mastodon-tl--propertize-img-str-or-url "mastodon-tl") -(autoload 'mastodon-tl--property "mastodon-tl") (defvar url-show-status) @@ -198,26 +197,6 @@ image-data prop so it can be toggled." sensitive-state hidden image-data ,image)))) -(defun mastodon-media--toggle-sensitive-image () - "Toggle dislay of sensitive image at point." - (interactive) - (let ((data (mastodon-tl--property 'image-data :no-move)) - (inhibit-read-only t) - (end (next-single-property-change (point) 'sensitive-state))) - (if (equal 'hidden (mastodon-tl--property 'sensitive-state :no-move)) - ;; display sensitive image: - (add-text-properties (point) end - `(display ,data - sensitive-state showing)) - ;; hide sensitive image: - (add-text-properties (point) end - `( sensitive-state hidden - display - ;; TODO: use an image placeholder - ,(create-image mastodon-media--generic-broken-image-data nil t) - ;; ,(mastodon-search--format-heading " SENSITIVE") - ))))) - (defun mastodon-media--process-full-sized-image-response (status-plist url) ;; FIXME: refactor this with but not into ;; `mastodon-media--process-image-response'. |