1
0
Fork 0

- simplified 'refresh-gemini-message-window'.

This commit is contained in:
cage 2021-04-05 15:48:30 +02:00
parent eefb64eb8e
commit fc1aa5f1e6
1 changed files with 15 additions and 21 deletions

View File

@ -1096,27 +1096,21 @@
(defun refresh-gemini-message-window (links source rendered-text ir-rows append-text)
(let* ((win specials:*message-window*)
(window-metadata (message-window:metadata win)))
(if append-text
(with-accessors ((rows message-window::rows)) win
(let ((new-rows (message-window:text->rendered-lines-rows win
ir-rows))
(reversed-rows (reverse rows)))
(message-window:append-source-text win rendered-text :prepare-for-rendering nil)
(gemini-viewer:append-metadata-link window-metadata links)
(gemini-viewer:append-metadata-source window-metadata source)
(loop for new-row in new-rows do
(push new-row reversed-rows))
(setf rows (reverse reversed-rows))))
(with-accessors ((rows message-window::rows)) win
(let ((new-rows (message-window:text->rendered-lines-rows win
ir-rows))
(reversed-rows (reverse rows)))
(loop for new-row in new-rows do
(push new-row reversed-rows))
(setf rows (reverse reversed-rows))
(message-window:append-source-text win rendered-text :prepare-for-rendering nil)
(setf (gemini-viewer:gemini-metadata-source-file window-metadata) source)
(setf (gemini-viewer:gemini-metadata-links window-metadata) links))))))
(with-accessors ((rows message-window::rows)) win
(let ((new-rows (message-window:text->rendered-lines-rows win
ir-rows))
(reversed-rows (reverse rows)))
(loop for new-row in new-rows do
(push new-row reversed-rows))
(setf rows (reverse reversed-rows))
(message-window:append-source-text win rendered-text :prepare-for-rendering nil)
(if append-text
(progn
(gemini-viewer:append-metadata-link window-metadata links)
(gemini-viewer:append-metadata-source window-metadata source))
(progn
(setf (gemini-viewer:gemini-metadata-source-file window-metadata) source)
(setf (gemini-viewer:gemini-metadata-links window-metadata) links)))))))
(defmethod process-event ((object gemini-got-line-event))
(with-accessors ((response payload)