mirror of https://codeberg.org/cage/tinmop/
- added a configuration directive to leave or delete mentions from the server after fetching them.
This commit is contained in:
parent
c83f21a76f
commit
937d2faba5
|
@ -45,6 +45,10 @@ post-allowed-language = ".*"
|
|||
# (default 'no', change to 'yes' if desired)
|
||||
start.update.gemlog = no
|
||||
|
||||
# delete mentions fetched from the server
|
||||
|
||||
delete.fetched.mentions = yes
|
||||
|
||||
# directory to scan for gempub files, default the same as
|
||||
# $XDG_DATA_HOME (usually something like %HOME/.local/share/tinmop/").
|
||||
|
||||
|
|
|
@ -756,7 +756,6 @@ the latest 15 mentions)."
|
|||
mentions-so-far))
|
||||
|
||||
(defun update-mentions-folder (&key (delete-mentions-on-server t))
|
||||
(declare (ignorable delete-mentions-on-server)) ; because of the render macro '#-debug-mode'
|
||||
(let ((trees '()))
|
||||
(when-let* ((all-mentions (all-mentions))
|
||||
(statuses (loop for mention in all-mentions
|
||||
|
@ -774,7 +773,6 @@ the latest 15 mentions)."
|
|||
:folder db:+mentions-status-folder+
|
||||
:localp t
|
||||
:min-id nil)))
|
||||
#-debug-mode
|
||||
(when delete-mentions-on-server
|
||||
(loop for mention in all-mentions do
|
||||
(delete-notification (tooter:id mention))))
|
||||
|
|
|
@ -1252,6 +1252,7 @@
|
|||
:tree-config-rendering-values
|
||||
:make-tree-colormap
|
||||
:left-arrow
|
||||
:config-delete-fetched-mentions-p
|
||||
:config-gemini-fullscreen-toc-width
|
||||
:config-gemini-fullscreen-links-height
|
||||
:config-post-allowed-language
|
||||
|
|
|
@ -971,7 +971,9 @@
|
|||
(defclass update-mentions-event (program-event) ())
|
||||
|
||||
(defmethod process-event ((object update-mentions-event))
|
||||
(when-let* ((mentions (api-client:update-mentions-folder :delete-mentions-on-server t))
|
||||
(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))
|
||||
(mentions-count (length mentions))
|
||||
(thread-window specials:*thread-window*))
|
||||
(when command-line:*notify-mentions*
|
||||
|
@ -981,7 +983,7 @@
|
|||
(n_ "Got ~a notification"
|
||||
"Got ~a notifications"
|
||||
mentions-count)
|
||||
mentions-count)))))
|
||||
mentions-count))))))
|
||||
|
||||
(defclass expand-thread-event (program-event event-with-timeline-and-folder)
|
||||
((status-id
|
||||
|
|
|
@ -601,6 +601,8 @@
|
|||
selected
|
||||
unselected
|
||||
deleted
|
||||
fetched
|
||||
delete
|
||||
input
|
||||
read
|
||||
unread
|
||||
|
@ -622,7 +624,8 @@
|
|||
ignore-user-boost-re
|
||||
post-allowed-language
|
||||
purge-history-days-offset
|
||||
purge-cache-days-offset)
|
||||
purge-cache-days-offset
|
||||
mentions)
|
||||
|
||||
(defun perform-missing-value-check (file)
|
||||
(handler-case
|
||||
|
@ -983,6 +986,12 @@
|
|||
(,transform-value-fn (access:accesses *software-configuration*
|
||||
,@keys))))
|
||||
|
||||
(gen-simple-access (delete-fetched-mentions-p
|
||||
:transform-value-fn db-utils:db-not-nil-p)
|
||||
+key-delete+
|
||||
+key-fetched+
|
||||
+key-mentions+)
|
||||
|
||||
(gen-simple-access (gemini-fullscreen-toc-width
|
||||
:transform-value-fn main-window:parse-subwin-w)
|
||||
+key-gemini+
|
||||
|
|
Loading…
Reference in New Issue