diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-08-09 11:52:06 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-08-16 08:44:27 +0200 |
commit | 4c7fc8b47517249a271d64e104f68cf59048e872 (patch) | |
tree | 35f1d77ba6cc4a0e65de731b288f1dceb81fd54a /lisp/mastodon-views.el | |
parent | 45903de823d3c6b46c4aa694112e9f5429e1a3f9 (diff) |
basic apply filters. #575.
Diffstat (limited to 'lisp/mastodon-views.el')
-rw-r--r-- | lisp/mastodon-views.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index 775b96b..a3acfe0 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -624,6 +624,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\", @@ -638,7 +641,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) @@ -651,9 +654,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." |