mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-05 04:57:40 +01:00
- [GUI] ensured rendering TOC only after there is no more data in the gemtext stream.
This commit is contained in:
parent
ff87d84ae4
commit
aae67c4121
@ -123,6 +123,18 @@
|
|||||||
1
|
1
|
||||||
iri)))
|
iri)))
|
||||||
status-completed))
|
status-completed))
|
||||||
|
(perform-after-stream-exausted-actions ()
|
||||||
|
(print-info-message (_ "Stream finished"))
|
||||||
|
(gui:configure-mouse-pointer (gemtext-widget main-window) :xterm)
|
||||||
|
(render-toc main-window iri)
|
||||||
|
(a:when-let* ((fragment (uri:fragment (iri:iri-parse iri)))
|
||||||
|
(regexp (gemini-viewer::fragment->regex fragment)))
|
||||||
|
(setf (gui:text (client-search-frame::entry (search-frame main-window)))
|
||||||
|
regexp)
|
||||||
|
(funcall (client-search-frame::start-search-clsr (search-frame main-window)
|
||||||
|
(gemtext-widget main-window)
|
||||||
|
nil)
|
||||||
|
nil)))
|
||||||
(loop-fetch (&optional (last-lines-fetched-count 0))
|
(loop-fetch (&optional (last-lines-fetched-count 0))
|
||||||
(ev:with-enqueued-process-and-unblock ()
|
(ev:with-enqueued-process-and-unblock ()
|
||||||
(gui-goodies:with-notify-errors
|
(gui-goodies:with-notify-errors
|
||||||
@ -134,16 +146,13 @@
|
|||||||
(next-start-fetching (length last-lines-fetched)))
|
(next-start-fetching (length last-lines-fetched)))
|
||||||
(when last-lines-fetched
|
(when last-lines-fetched
|
||||||
(funcall process-function stream-wrapper last-lines-fetched))
|
(funcall process-function stream-wrapper last-lines-fetched))
|
||||||
(when (not (or (funcall aborting-function)
|
(if (not (or (funcall aborting-function)
|
||||||
(and (stream-exausted-p)
|
(and (stream-exausted-p)
|
||||||
(<= next-start-fetching 0))))
|
(<= next-start-fetching 0))))
|
||||||
(loop-fetch (+ last-lines-fetched-count
|
(loop-fetch (+ last-lines-fetched-count
|
||||||
next-start-fetching))))))))
|
next-start-fetching))
|
||||||
|
(perform-after-stream-exausted-actions)))))))
|
||||||
(loop-fetch)
|
(loop-fetch)
|
||||||
(ev:with-enqueued-process-and-unblock ()
|
|
||||||
(print-info-message (_ "Stream finished"))
|
|
||||||
(gui:configure-mouse-pointer (gemtext-widget main-window) :xterm)
|
|
||||||
(render-toc main-window iri))
|
|
||||||
(if (cev:enqueue-request-and-wait-results :gemini-bookmarked-p
|
(if (cev:enqueue-request-and-wait-results :gemini-bookmarked-p
|
||||||
1
|
1
|
||||||
ev:+standard-event-priority+
|
ev:+standard-event-priority+
|
||||||
@ -153,16 +162,7 @@
|
|||||||
(ev:with-enqueued-process-and-unblock ()
|
(ev:with-enqueued-process-and-unblock ()
|
||||||
(set-bookmark-button-false main-window)))
|
(set-bookmark-button-false main-window)))
|
||||||
(ev:with-enqueued-process-and-unblock ()
|
(ev:with-enqueued-process-and-unblock ()
|
||||||
(set-gemlog-toolbar-button-appearance main-window iri))
|
(set-gemlog-toolbar-button-appearance main-window iri))))
|
||||||
(ev:with-enqueued-process-and-unblock ()
|
|
||||||
(a:when-let* ((fragment (uri:fragment (iri:iri-parse iri)))
|
|
||||||
(regexp (gemini-viewer::fragment->regex fragment)))
|
|
||||||
(setf (gui:text (client-search-frame::entry (search-frame main-window)))
|
|
||||||
regexp)
|
|
||||||
(funcall (client-search-frame::start-search-clsr (search-frame main-window)
|
|
||||||
(gemtext-widget main-window)
|
|
||||||
nil)
|
|
||||||
nil)))))
|
|
||||||
|
|
||||||
(defun set-gemlog-toolbar-button-appearance (main-window iri)
|
(defun set-gemlog-toolbar-button-appearance (main-window iri)
|
||||||
(if (comm:make-request :gemini-gemlog-subscribed-p 1 iri)
|
(if (comm:make-request :gemini-gemlog-subscribed-p 1 iri)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user