diff --git a/src/api-client.lisp b/src/api-client.lisp index 7defcd8..a070393 100644 --- a/src/api-client.lisp +++ b/src/api-client.lisp @@ -789,18 +789,20 @@ the latest 15 mentions)." (tooter:account-name (tooter:account notification))))) (tui:make-tui-string raw-text))) -(defun update-mentions-folder (&key (delete-mentions-on-server t)) +(defun update-mentions-folder (&key (delete-mentions-on-server t) (collect-threads t)) (let ((trees '())) (when-let* ((all-mentions (all-mentions)) (statuses (loop for mention in all-mentions when (tooter:status mention) collect (tooter:status mention)))) - (loop for status in statuses - when (not (member status trees)) - do - (loop for node in (expand-status-tree status) - do - (pushnew node trees))) + (if collect-threads + (loop for status in statuses + when (not (member status trees)) + do + (loop for node in (expand-status-tree status) + do + (pushnew node trees))) + (setf trees statuses)) (let ((event (make-instance 'program-events:save-timeline-in-db-event :payload trees :timeline-type db:+home-timeline+ diff --git a/src/program-events.lisp b/src/program-events.lisp index 9c4609c..ecd792d 100644 --- a/src/program-events.lisp +++ b/src/program-events.lisp @@ -1067,7 +1067,8 @@ (defmethod process-event ((object update-mentions-event)) (let ((delete-fetched-mentions-required (swconf:config-delete-fetched-mentions-p))) (when-let* ((mentions (api-client:update-mentions-folder - :delete-mentions-on-server delete-fetched-mentions-required)) + :delete-mentions-on-server delete-fetched-mentions-required + :collect-threads nil)) (mentions-count (length mentions)) (thread-window specials:*thread-window*)) (when command-line:*notify-mentions*