From 7e21eeabc68102e4bae6c5729a69daf5b9e2aca4 Mon Sep 17 00:00:00 2001 From: mousebot Date: Sat, 5 Feb 2022 15:15:05 +0100 Subject: message when notificiations--timeline returns nothing. --- lisp/mastodon-notifications.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el index ce26924..5e3305a 100644 --- a/lisp/mastodon-notifications.el +++ b/lisp/mastodon-notifications.el @@ -238,8 +238,10 @@ ID is the notification's own id, which is attached as a property." (defun mastodon-notifications--timeline (json) "Format JSON in Emacs buffer." - (mapc #'mastodon-notifications--by-type json) - (goto-char (point-min))) + (if (equal json '[]) + (message "Looks like you have no notifications for the moment.") + (mapc #'mastodon-notifications--by-type json) + (goto-char (point-min)))) (defun mastodon-notifications--get () "Display NOTIFICATIONS in buffer." -- cgit v1.2.3