aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-views.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-08-15 10:36:45 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-08-15 10:36:45 +0200
commitd5999c7d467982845d53def10368810544dc2fa8 (patch)
tree146211d3accfa48a15e1f365d87e3aeaa3ff35fb /lisp/mastodon-views.el
parenta8c93def01a7d0d1b09b61d743fef99987fbce3f (diff)
parent3bd81ee203d880ca83e3ec22172c0a2508c4d78e (diff)
Merge branch 'filters-apply' into develop
Diffstat (limited to 'lisp/mastodon-views.el')
-rw-r--r--lisp/mastodon-views.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el
index 54f829d..9b40541 100644
--- a/lisp/mastodon-views.el
+++ b/lisp/mastodon-views.el
@@ -617,6 +617,9 @@ JSON is the filters data."
'byline t) ;for goto-next-filter compat
"\n\n")))
+(defvar mastodon-views--filter-types
+ '("home" "notifications" "public" "thread" "profile"))
+
(defun mastodon-views--create-filter ()
"Create a filter for a word.
Prompt for a context, must be a list containting at least one of \"home\",
@@ -631,7 +634,7 @@ Prompt for a context, must be a list containting at least one of \"home\",
(user-error "You must select at least one word for a filter")
(completing-read-multiple
"Contexts to filter [TAB for options]: "
- '("home" "notifications" "public" "thread")
+ mastodon-views--filter-types
nil t)))
(contexts-processed
(if (equal nil contexts)
@@ -643,9 +646,9 @@ Prompt for a context, must be a list containting at least one of \"home\",
contexts-processed))))
(mastodon-http--triage response
(lambda (_)
- (message "Filter created for %s!" word)
(when (mastodon-tl--buffer-type-eq 'filters)
- (mastodon-views--view-filters))))))
+ (mastodon-views--view-filters))
+ (message "Filter created for %s!" word)))))
(defun mastodon-views--delete-filter ()
"Delete filter at point."