diff --git a/src/program-events.lisp b/src/program-events.lisp index 8798962..6371f3d 100644 --- a/src/program-events.lisp +++ b/src/program-events.lisp @@ -2016,12 +2016,16 @@ (_ "accounts~2%"))) found-accounts))) (loop for status in found-statuses do - (db:remove-from-status-ignored (tooter:id status) - (query-results-folder-name) - db:+home-timeline+) - (db:update-db status - :folder (query-results-folder-name) - :timeline db:+home-timeline+)) + (when (not (db::find-status-id-folder-timeline (tooter:id status) + (query-results-folder-name) + db:+home-timeline+)) + + (db:remove-from-status-ignored (tooter:id status) + (query-results-folder-name) + db:+home-timeline+) + (db:update-db status + :folder (query-results-folder-name) + :timeline db:+home-timeline+))) (db:renumber-timeline-message-index db:+home-timeline+ (query-results-folder-name) :account-id nil) @@ -2047,6 +2051,9 @@ (multiple-value-bind (query column-values) (db-utils:insert-query db:+table-status+ status-row) (db-utils:query-low-level query column-values))))) + (db:renumber-timeline-message-index db:+home-timeline+ + (query-results-folder-name) + :account-id nil) (let ((refresh-event (make-instance 'refresh-thread-windows-event :new-folder (query-results-folder-name) :new-timeline db:+home-timeline+)))