branch: elpa/mastodon
commit eead81668b02a5e652e1fe74ee8e144f15b2eded
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>
add boilerplate alert.el persistent rule. FIX #772.
---
lisp/mastodon-notifications.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index 3df0afdf66..bca57ef959 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -842,6 +842,13 @@ Status notifications are created when you call
(alert-add-rule :mode 'mastodon-mode
:status '(buried visible idle selected)
+ :persistent
+ #'(lambda (info)
+ ;; If the buffer is buried, or the user has been idle
+ ;; for `alert-reveal-idle-time' seconds, make this
+ ;; alert persistent. Normally, alerts become
+ ;; persistent after `alert-persist-idle-time' seconds.
+ (memq (plist-get info :status) '(buried idle)))
;; FIXME: if user configures this variable, we need to
;; remove this rule and re-add it! or they need to restart
;; emacs?: