mirror of https://codeberg.org/cage/tinmop/
- added toc when a gemini file is loaded from a local file.
This commit is contained in:
parent
78de3329a8
commit
8376d1b0fd
|
@ -97,8 +97,7 @@
|
|||
(ensure-just-one-stream-rendering)
|
||||
(force-rendering-of-cached-file stream-object)
|
||||
(setf (stream-status stream-object) :completed)
|
||||
(let ((toc-event (make-instance 'program-events:gemini-toc-open)))
|
||||
(program-events:push-event toc-event)))
|
||||
(ui:open-gemini-toc))
|
||||
((gemini-client:text-file-stream-p meta)
|
||||
(ensure-just-one-stream-rendering)
|
||||
(force-rendering-of-cached-file stream-object)
|
||||
|
|
|
@ -1042,6 +1042,7 @@
|
|||
gemini-client:*gemini-page-theme*)))
|
||||
(gemini-viewer:maybe-initialize-metadata window)
|
||||
(refresh-gemini-message-window links page-data ir-text nil)
|
||||
(ui:open-gemini-toc)
|
||||
(windows:draw window)))))
|
||||
|
||||
(defclass gemini-request-event (program-event)
|
||||
|
@ -1143,18 +1144,13 @@
|
|||
(t
|
||||
(let* ((file-string (fs:slurp-file local-path))
|
||||
(parent-dir (fs:parent-dir-path local-path))
|
||||
(parsed (gemini-parser:parse-gemini-file file-string))
|
||||
(links (gemini-parser:sexp->links parsed
|
||||
nil
|
||||
nil
|
||||
parent-dir
|
||||
:comes-from-local-file t))
|
||||
(ir-text (gemini-parser:sexp->text-rows parsed
|
||||
gemini-client:*gemini-page-theme*)))
|
||||
(gemini-viewer:maybe-initialize-metadata window)
|
||||
(gemini-viewer:push-url-to-history window local-path)
|
||||
(refresh-gemini-message-window links file-string ir-text nil)
|
||||
(windows:draw window))))))))
|
||||
(event (make-instance 'gemini-display-data-page
|
||||
:local-path parent-dir
|
||||
:window window
|
||||
:payload file-string)))
|
||||
(let ((*process-events-immediately* t))
|
||||
(push-event event))
|
||||
(gemini-viewer:push-url-to-history window local-path))))))))
|
||||
|
||||
(defclass gemini-back-event (program-event) ())
|
||||
|
||||
|
|
Loading…
Reference in New Issue