1
0
Fork 0

- [gemini] ensure link opened is saved in history.

This commit is contained in:
cage 2021-01-11 18:21:38 +01:00
parent e106bedf3d
commit 7f5a21c9ed
3 changed files with 8 additions and 1 deletions

View File

@ -76,6 +76,7 @@
(let ((program-events:*process-events-immediately* t) (let ((program-events:*process-events-immediately* t)
(event (make-instance 'program-events:gemini-push-behind-downloading-event (event (make-instance 'program-events:gemini-push-behind-downloading-event
:priority program-events:+maximum-event-priority+))) :priority program-events:+maximum-event-priority+)))
(db:insert-in-history (ui:gemini-open-url-prompt) url)
(gemini-viewer:ensure-just-one-stream-rendering) (gemini-viewer:ensure-just-one-stream-rendering)
(program-events:push-event event)) (program-events:push-event event))
(gemini-viewer:request url :enqueue enqueue (gemini-viewer:request url :enqueue enqueue

View File

@ -2371,6 +2371,7 @@
:chat-create-new :chat-create-new
:chat-list-go-up :chat-list-go-up
:chat-list-go-down :chat-list-go-down
:gemini-open-url-prompt
:open-gemini-address :open-gemini-address
:gemini-history-back :gemini-history-back
:gemini-view-source :gemini-view-source

View File

@ -1770,6 +1770,11 @@ mot recent updated to least recent"
;;;; gemini ;;;; gemini
(defun gemini-open-url-prompt ()
"This is used when oppening gemini link too, see:
open-message-link-window:open-message-link"
(_ "Open Gemini url: "))
(defun open-gemini-address () (defun open-gemini-address ()
"Ask for a gemini address and try to load it" "Ask for a gemini address and try to load it"
(flet ((on-input-complete (url) (flet ((on-input-complete (url)
@ -1781,7 +1786,7 @@ mot recent updated to least recent"
:url url))) :url url)))
(program-events:push-event event)) (program-events:push-event event))
(error-message (_ "This is not a valid gemini address"))))) (error-message (_ "This is not a valid gemini address")))))
(let ((prompt (_ "Open Gemini url: "))) (let ((prompt (gemini-open-url-prompt)))
(ask-string-input #'on-input-complete (ask-string-input #'on-input-complete
:prompt prompt :prompt prompt
:complete-fn (complete:make-complete-gemini-iri-fn prompt))))) :complete-fn (complete:make-complete-gemini-iri-fn prompt)))))