branch: elpa/mastodon commit 8fbce728a1a5247b670927f219403fa7805e4475 Author: marty hiatt <martianhia...@disroot.org> Commit: marty hiatt <martianhia...@disroot.org>
tl update: error if no newest id. #673. --- lisp/mastodon-tl.el | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 11e0fec53f..ed7a94f7de 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -3518,20 +3518,22 @@ This location is defined by a non-nil value of ;; load whole thread: (progn (mastodon-tl--thread-do id) (message "Loaded full thread.")) - ;; update other timelines: - (let* ((params (mastodon-tl--update-params)) - (json (mastodon-tl--updated-json endpoint id params))) - (if (not json) - (user-error "Nothing to update") - (let ((inhibit-read-only t)) - (mastodon-tl--set-after-update-marker) - (goto-char (or mastodon-tl--update-point (point-min))) - (if (eq update-function 'mastodon-notifications--timeline) - (funcall update-function json nil :update) - (funcall update-function json)) - (if mastodon-tl--after-update-marker - (goto-char mastodon-tl--after-update-marker) - (mastodon-tl-goto-next-item))))))))) + (if (not id) ;; if e.g. notifs all cleared: + (user-error "No last id") + ;; update other timelines: + (let* ((params (mastodon-tl--update-params)) + (json (mastodon-tl--updated-json endpoint id params))) + (if (not json) + (user-error "Nothing to update") + (let ((inhibit-read-only t)) + (mastodon-tl--set-after-update-marker) + (goto-char (or mastodon-tl--update-point (point-min))) + (if (eq update-function 'mastodon-notifications--timeline) + (funcall update-function json nil :update) + (funcall update-function json)) + (if mastodon-tl--after-update-marker + (goto-char mastodon-tl--after-update-marker) + (mastodon-tl-goto-next-item)))))))))) ;;; LOADING TIMELINES