mirror of https://codeberg.org/cage/tinmop/
- catched all errors signaled when something has gone wrong downloading the messages containing the subscribed tags.
This commit is contained in:
parent
5ca70367b8
commit
416d9356e4
|
@ -1030,29 +1030,36 @@ It an existing file path is provided the command will refuse to run."
|
|||
(let* ((all-tags (db:all-subscribed-tags-name))
|
||||
(all-paginations (db:all-tag-paginations-status all-tags)))
|
||||
(flet ((update ()
|
||||
(handler-bind ((tooter:request-failed
|
||||
(lambda (e)
|
||||
(notify (format nil
|
||||
(_ "Error getting the latest unread messages for tag ~a, trying fetching the latest")
|
||||
(tooter:uri e))
|
||||
:as-error t)
|
||||
(invoke-restart 'api-client::retry-ignoring-min-id))))
|
||||
(client:update-subscribed-tags all-tags all-paginations))
|
||||
(with-enqueued-process ()
|
||||
(handler-bind ((tooter:request-failed
|
||||
(lambda (e)
|
||||
(notify (format nil
|
||||
(_ "Error getting the latest unread messages for tag ~a, trying fetching the latest")
|
||||
(tooter:uri e))
|
||||
:as-error t)
|
||||
(invoke-restart 'api-client::retry-ignoring-min-id)))
|
||||
(error
|
||||
(lambda (e)
|
||||
(notify (format nil
|
||||
(_ "Error getting the latest unread messages: ~s, trying fetching the latest")
|
||||
(type-of e))
|
||||
:as-error t)
|
||||
(invoke-restart 'api-client::retry-ignoring-min-id))))
|
||||
(client:update-subscribed-tags all-tags all-paginations)))
|
||||
(let ((update-got-message-event
|
||||
(make-instance 'tag-mark-got-messages-event))
|
||||
(make-instance 'tag-mark-got-messages-event))
|
||||
(notify-event
|
||||
(make-instance 'notify-fetched-new-tag-messages-event))
|
||||
(make-instance 'notify-fetched-new-tag-messages-event))
|
||||
(update-subscribed-event
|
||||
(make-instance 'update-last-refresh-subscribe-tags-event))
|
||||
(make-instance 'update-last-refresh-subscribe-tags-event))
|
||||
(refresh-window-event (make-instance 'refresh-tag-window-event)))
|
||||
(push-event update-got-message-event)
|
||||
(push-event notify-event)
|
||||
(push-event update-subscribed-event)
|
||||
(push-event refresh-window-event))))
|
||||
(notify-procedure #'update
|
||||
(_ "Downloading tags messages.")
|
||||
:ending-message (_ "Messages downloaded.")
|
||||
:life-start (* (swconf:config-notification-life) 5)))))
|
||||
(notify (_ "Downloading tags messages."))
|
||||
(update)
|
||||
(notify (_ "Messages downloaded.")))))
|
||||
|
||||
(defun confirm-selected-row-action (message)
|
||||
(when-let* ((selected-row (line-oriented-window:selected-row-fields *thread-window*))
|
||||
|
|
Loading…
Reference in New Issue