mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-05 04:57:40 +01:00
- optimized expanding of status trees that contains mentions;
- fixed file path of Makefile.am; - fixed typo.
This commit is contained in:
parent
fdfd9e5062
commit
e07f4d2ee3
@ -36,7 +36,7 @@ etc/init.lisp compare_version.awk
|
||||
SUBDIRS = po
|
||||
|
||||
dist_doc_DATA = README.org README.txt LICENSES.org CONTRIBUTING.org \
|
||||
doc/man.org doc/send-toot.lisp NEWS.org ChangeLog AUTHORS
|
||||
doc/tinmop.org doc/send-toot.lisp NEWS.org ChangeLog AUTHORS
|
||||
|
||||
confdir = $(sysconfdir)/$(PACKAGE)
|
||||
|
||||
|
@ -401,7 +401,7 @@ etc/init.lisp compare_version.awk
|
||||
|
||||
SUBDIRS = po
|
||||
dist_doc_DATA = README.org README.txt LICENSES.org CONTRIBUTING.org \
|
||||
doc/man.org doc/send-toot.lisp NEWS.org ChangeLog AUTHORS
|
||||
doc/tinmop.org doc/send-toot.lisp NEWS.org ChangeLog AUTHORS
|
||||
|
||||
confdir = $(sysconfdir)/$(PACKAGE)
|
||||
dist_conf_DATA = etc/init.lisp etc/default-theme.conf etc/shared.conf
|
||||
|
@ -727,24 +727,28 @@ the latest 15 mentions)."
|
||||
mentions-so-far))
|
||||
|
||||
(defun update-mentions-folder (&key (delete-mentions-on-server t))
|
||||
(let ((trees '()))
|
||||
(when-let* ((all-mentions (all-mentions))
|
||||
(trees (flatten (loop
|
||||
for mention in all-mentions
|
||||
(statuses (loop for mention in all-mentions
|
||||
when (tooter:status mention)
|
||||
collect
|
||||
(expand-status-tree (tooter:status mention)))))
|
||||
(event (make-instance 'program-events:save-timeline-in-db-event
|
||||
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)))
|
||||
(let ((event (make-instance 'program-events:save-timeline-in-db-event
|
||||
:payload trees
|
||||
:timeline-type db:+home-timeline+
|
||||
:folder db:+mentions-status-folder+
|
||||
:localp t
|
||||
:min-id nil)))
|
||||
(when delete-mentions-on-server
|
||||
(map nil
|
||||
(lambda (m) (delete-notification (tooter:id m)))
|
||||
all-mentions))
|
||||
(loop for mention in all-mentions do
|
||||
(delete-notification (tooter:id mention))))
|
||||
(program-events:push-event event)
|
||||
all-mentions))
|
||||
all-mentions))))
|
||||
|
||||
(defun expand-status-thread (status-id timeline folder force-saving-of-ignored-status-p)
|
||||
(when-let* ((tree (expand-status-tree status-id))
|
||||
@ -789,7 +793,7 @@ node-status-id is not a leaf)."
|
||||
(expand-status-tree (tooter:id object)))
|
||||
|
||||
(defmethod expand-status-tree ((object string))
|
||||
"Given a status id returns the complete mesaages tree this status belong."
|
||||
"Given a status id returns the complete messages tree this status belong."
|
||||
(multiple-value-bind (root fetched-branch)
|
||||
(climb-fetch-statuses object)
|
||||
(let ((res (copy-list fetched-branch)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user