mirror of
https://codeberg.org/cage/tinmop/
synced 2024-12-22 23:47:56 +01:00
- made gemlog's updating non blocking.
This commit is contained in:
parent
6d441d1ae0
commit
a0bfde0ede
@ -39,7 +39,7 @@ editor = "nano --locking"
|
||||
|
||||
# update gemlog subscriptions when program starts
|
||||
# (default 'no', change to 'yes' if desired)
|
||||
start.update.gemlog = no
|
||||
start.update.gemlog = yes
|
||||
|
||||
# close links window when opening the selected link
|
||||
|
||||
|
@ -1296,11 +1296,13 @@
|
||||
(defmethod process-event ((object gemlog-refresh-all-event))
|
||||
(let ((all-subscribed-gemlogs (mapcar #'db:row-url (db:gemini-all-subscriptions))))
|
||||
(mapcar (lambda (subscription)
|
||||
(let* ((payload (lambda ()
|
||||
(ui:notify (format nil
|
||||
(_ "updating gemlog ~a")
|
||||
subscription))
|
||||
(gemini-subscription:refresh subscription)))
|
||||
(let* ((notification-message (format nil (_ "updating gemlog ~a") subscription))
|
||||
(payload (lambda ()
|
||||
(ui:notify-procedure (lambda ()
|
||||
(db-utils:with-ready-database ()
|
||||
(gemini-subscription:refresh subscription)))
|
||||
notification-message
|
||||
:ending-message nil)))
|
||||
(event (make-instance 'function-event
|
||||
:payload payload
|
||||
:priority +minimum-event-priority+)))
|
||||
|
@ -88,9 +88,11 @@
|
||||
(life-start nil)
|
||||
(life-end nil))
|
||||
(bt:make-thread (lambda ()
|
||||
(notify starting-message :life life-start)
|
||||
(when (string-not-empty-p starting-message)
|
||||
(notify starting-message :life life-start))
|
||||
(funcall procedure)
|
||||
(notify ending-message :life life-end))))
|
||||
(when (string-not-empty-p ending-message)
|
||||
(notify ending-message :life life-end)))))
|
||||
|
||||
(defmacro with-blocking-notify-procedure ((starting-message
|
||||
&optional (ending-message `(_ "Task completed")))
|
||||
|
Loading…
Reference in New Issue
Block a user