aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 3e4e31e..e279ee3 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1303,10 +1303,13 @@ Runs `mastodon-tl--render-text' and fetches poll or media."
(defun mastodon-tl--prev-item-id ()
"Return the id of the last toot inserted into the buffer."
- (let ((prev-pos
- (1- (save-excursion
- (previous-single-property-change (point) 'base-item-id)))))
- (get-text-property prev-pos 'base-item-id)))
+ (let* ((prev-change
+ (save-excursion
+ (previous-single-property-change (point) 'base-toot-id)))
+ (prev-pos
+ (when prev-change (1- prev-change))))
+ (when prev-pos
+ (get-text-property prev-pos 'base-toot-id))))
(defun mastodon-tl--after-reply-status (reply-to-id)
"T if REPLY-TO-ID is equal to that of the last toot inserted in the bufer."