1
0
Fork 0

- changed class name from 'update-timeline-event' to

'save-timeline-in-db-event'.
This commit is contained in:
cage 2020-05-14 16:49:05 +02:00
parent c975074667
commit dbdc2d9590
3 changed files with 18 additions and 18 deletions

View File

@ -310,7 +310,7 @@ authorizations was performed with success."
:limit limit))
(trees (flatten (loop for node-status in timeline-statuses collect
(expand-status-tree node-status))))
(event (make-instance 'program-events:update-timeline-event
(event (make-instance 'program-events:save-timeline-in-db-event
:payload trees
:timeline-type timeline
:folder folder
@ -320,7 +320,7 @@ authorizations was performed with success."
;; note that, because events are enqueued with priority and the
;; first instanced event has better priority the another instanced
;; later, the events generated by the function below will run
;; after the update-timeline-event; in this case it does not
;; after the save-timeline-in-db-event; in this case it does not
;; matter, though
(update-pagination-statuses-so-far timeline-statuses timeline folder)
(program-events:push-event event)))
@ -344,18 +344,18 @@ authorizations was performed with success."
reflectings the changes in the timeline (saves messages in the
database etc.)"
(when tag
(let* ((timeline-statuses (get-timeline-tag tag
:min-id min-id
:limit limit))
(trees (flatten (loop for node-status in timeline-statuses collect
(expand-status-tree node-status))))
(update-timeline-event (make-instance 'program-events:update-timeline-event
:payload trees
:timeline-type db:+federated-timeline+
:folder folder
:localp nil
:min-id min-id)))
(program-events:push-event update-timeline-event))))
(let* ((timeline-statuses (get-timeline-tag tag
:min-id min-id
:limit limit))
(trees (flatten (loop for node-status in timeline-statuses collect
(expand-status-tree node-status))))
(save-timeline-in-db-event (make-instance 'program-events:save-timeline-in-db-event
:payload trees
:timeline-type db:+federated-timeline+
:folder folder
:localp nil
:min-id min-id)))
(program-events:push-event save-timeline-in-db-event))))
(defun tag-name (tag &key (return-empty-string-if-nil nil))
"Returns a convevient tag name from `tooter:tag'.

View File

@ -1076,7 +1076,7 @@
:user-input-string-event
:notify-user-event
:remove-notify-user-event
:update-timeline-event
:save-timeline-in-db-event
:timeline-type
:localp
:min-id

View File

@ -254,7 +254,7 @@
(let ((win (payload object)))
(mtree:remove-child specials:*main-window* win)))
(defclass update-timeline-event (program-event)
(defclass save-timeline-in-db-event (program-event)
((timeline-type
:initform nil
:initarg :timeline-type
@ -273,7 +273,7 @@
:initarg :min-id
:accessor min-id)))
(defmethod process-event ((object update-timeline-event))
(defmethod process-event ((object save-timeline-in-db-event))
"Update a timeline, save messages, performs topological sorts"
(let ((statuses (payload object))
(timeline-type (timeline-type object))
@ -651,7 +651,7 @@
(defun fetch-conversations (message-root-id conversation-folder)
(let* ((conversation-tree (api-client:expand-conversations-tree message-root-id))
(event (make-instance 'update-timeline-event
(event (make-instance 'save-timeline-in-db-event
:payload conversation-tree
:timeline-type db:+default-converation-timeline+
:folder conversation-folder