mirror of https://codeberg.org/cage/tinmop/
- changed mentions saving, just save the posts where the user is mentioned, not the tree that contains the posts.
This commit is contained in:
parent
5a399987c8
commit
edab3dce36
|
@ -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+
|
||||
|
|
|
@ -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*
|
||||
|
|
Loading…
Reference in New Issue