diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-06-05 20:12:45 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-06-05 20:12:45 +0200 |
commit | 4b892cad51b4dacbc2a00426c90223b8fe97ac09 (patch) | |
tree | 5751f8f438a694ab809556439228e7e3a1ac59f5 /lisp/mastodon-media.el | |
parent | b8999c84719f1076616efb73ab8906dd71480c3a (diff) |
defcustom for hiding sensitive media
Diffstat (limited to 'lisp/mastodon-media.el')
-rw-r--r-- | lisp/mastodon-media.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/mastodon-media.el b/lisp/mastodon-media.el index ccc0893..d14d283 100644 --- a/lisp/mastodon-media.el +++ b/lisp/mastodon-media.el @@ -60,6 +60,10 @@ "Whether images should be cached." :type 'boolean) +(defcustom mastodon-media--hide-sensitive-media t + "Whether media marked as sensitive should be hidden." + :type 'boolean) + (defvar mastodon-media--generic-avatar-data (base64-decode-string "iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA @@ -314,7 +318,8 @@ MARKER, REGION-LENGTH and IMAGE are from `mastodon-media--process-image-response'. If the image is marked sensitive, the image is stored in image-data prop so it can be toggled." - (if (not (equal t (get-text-property marker 'sensitive))) + (if (or (not (equal t (get-text-property marker 'sensitive))) + (not mastodon-media--hide-sensitive-media)) ;; display image (put-text-property marker (+ marker region-length) 'display image) |