1
0
Fork 0

- [GUI] refresh gemlog window when marking posts as already read.

This commit is contained in:
cage 2024-08-30 15:35:02 +02:00
parent a08ec1e592
commit 08c0316e52
1 changed files with 8 additions and 5 deletions

View File

@ -154,7 +154,7 @@
ev:+standard-event-priority+
gemlog-url))
(defun contextual-menu-clrs (treeview-widget)
(defun contextual-menu-clrs (gemlog-frame treeview-widget)
(labels ((copy-uri ()
(a:when-let* ((selections (gui:treeview-get-selection treeview-widget))
(links (with-output-to-string (stream)
@ -176,12 +176,15 @@
(mapcar (lambda (post)
(ev:with-enqueued-process-and-unblock ()
(let ((post-url (db:row-post-link post)))
(gui-goodies:with-busy* ((gui:root-toplevel))
(gui-goodies:with-busy* (gemlog-frame)
(comm:make-request :gemini-mark-gemlog-post-read
1
post-url)))))
(all-gemlog-posts url)))))))
(all-gemlog-posts url))))
(ev:with-enqueued-process-and-unblock ()
(gui-goodies:with-busy* (gemlog-frame)
(let ((new-rows (all-rows)))
(resync-rows gemlog-frame new-rows)))))))
(lambda (z)
(declare (ignore z))
(let* ((popup-menu (gui:make-menu nil (_"gemlog menu")))
@ -223,7 +226,7 @@
(open-gemlog-clsr main-window table))
(gui:bind (gui:treeview (gui-goodies:tree table))
#$<3>$
(contextual-menu-clrs (gui:treeview (gui-goodies:tree table))))
(contextual-menu-clrs table (gui:treeview (gui-goodies:tree table))))
(gui:bind (gui:treeview (gui-goodies:tree table))
#$<KeyPress>$
(lambda (e)