[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mastodon b6676c180b 27/50: tl: improve ctrl flow in --spoi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mastodon b6676c180b 27/50: tl: improve ctrl flow in --spoiler + --toot |
Date: |
Sat, 2 Nov 2024 13:00:54 -0400 (EDT) |
branch: elpa/mastodon
commit b6676c180ba94002a3f03fa0b09931e886923f3d
Author: marty hiatt <martianhiatus@disroot.org>
Commit: marty hiatt <martianhiatus@disroot.org>
tl: improve ctrl flow in --spoiler + --toot
---
lisp/mastodon-tl.el | 38 +++++++++++++++++---------------------
1 file changed, 17 insertions(+), 21 deletions(-)
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index cfd99067c1..a5bd2e0203 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1275,25 +1275,22 @@ FILTER is a string to use as a filter warning spoiler
instead."
(cw (mastodon-tl--set-face message 'mastodon-cw-face)))
(concat
cw
- (propertize (mastodon-tl--content toot)
- 'invisible
- (if filter
- t
- (let ((cust mastodon-tl--expand-content-warnings))
- (cond ((eq t cust)
- nil)
- ((eq nil cust)
- t)
- ((eq 'server cust)
- (unless (eq t
- ;; If something goes wrong reading
prefs,
- ;; just return nil so CWs show by
default.
- (condition-case nil
-
(mastodon-profile--get-preferences-pref
- 'reading:expand:spoilers)
- (error nil)))
- t)))))
- 'mastodon-content-warning-body t))))
+ (propertize
+ (mastodon-tl--content toot)
+ 'invisible
+ (or filter ;; filters = invis
+ (let ((cust mastodon-tl--expand-content-warnings))
+ (if (not (eq 'server cust))
+ (not cust) ;; opp to setting
+ ;; respect server setting:
+ (not
+ ;; If something goes wrong reading prefs,
+ ;; just return nil so CWs show by default.
+ (condition-case nil
+ (mastodon-profile--get-preferences-pref
+ 'reading:expand:spoilers)
+ (error nil))))))
+ 'mastodon-content-warning-body t))))
;;; MEDIA
@@ -1792,8 +1789,7 @@ NO-CW means treat content warnings as unfolded."
(mastodon-tl--content toot)))))
;; If any filters are "hide", then we hide,
;; even though item may also have a "warn" filter:
- (if (and filtered (assoc "hide" filters))
- nil ;; no insert
+ (unless (and filtered (assoc "hide" filters)) ;; no insert
(mastodon-tl--insert-status
toot (mastodon-tl--clean-tabs-and-nl spoiler-or-content)
#'mastodon-tl--byline-boost nil nil detailed-p
- [nongnu] elpa/mastodon 639745a885 04/50: move notifs customizes into mastodon.el, (continued)
- [nongnu] elpa/mastodon 639745a885 04/50: move notifs customizes into mastodon.el, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon 0e75fc74ee 01/50: group-notifs custom (for servers without). #608. WIP., ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon bfb17cdf91 10/50: docstrings tl.el, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon f3602493da 03/50: fix notifs custom group, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon 8446f239bb 02/50: working v1 notifications custom. #608, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon b529690f96 06/50: notifs: refactor some v1/v2 calling code, mastodon-notifiations--body-arg, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon 14e3fa36cb 11/50: start on pagination for v1 notifs. #610, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon 4505b4e818 05/50: index, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon 1ba949586e 29/50: tl: improve ctrl flow in --spoiler + --toot. FIX #579, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon 5cb2bf1c04 16/50: FIX #610 fix note/base toot in format-note/author byline., ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon b6676c180b 27/50: tl: improve ctrl flow in --spoiler + --toot,
ELPA Syncer <=
- [nongnu] elpa/mastodon 089eee6485 15/50: notifs: fix author action byline, top, for ungrouped. FIX #612, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon d06ac674ef 19/50: docs: remove old arg docstring, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon b05de5f907 30/50: some ifs become whens, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon add6bfceaf 34/50: remove elsa from Cask, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon 31557be472 50/50: Merge branch 'develop', ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon c4edecd145 23/50: cask build cleanups, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon 2713081605 18/50: notifs: byline-accounts: remove toot arg, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon 3ec8a8386b 35/50: Merge branch 'non-group-notifs' into develop, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon 2bb6ad95f7 25/50: toot.el cask build cleanups, ELPA Syncer, 2024/11/02
- [nongnu] elpa/mastodon 2c3f35c953 31/50: some ifs become whens, ELPA Syncer, 2024/11/02