mirror of https://codeberg.org/cage/tinmop/
- improved formatting of text in window that shows the parent of a message.
This commit is contained in:
parent
5d69437bc4
commit
c16e88ad99
|
@ -3497,13 +3497,21 @@ gemini client certificates!)."
|
|||
(new-window-width (truncate (* (windows:win-width *main-window*) 2/3)))
|
||||
(status-id (actual-author-message-id selected-row))
|
||||
(parent-row (db:get-parent-status-row status-id))
|
||||
(words (split-words (db:row-message-rendered-text parent-row)))
|
||||
(lines (flush-left-mono-text words new-window-width))
|
||||
(lines (split-lines (db:row-message-rendered-text parent-row)))
|
||||
(bg (swconf:win-bg swconf:+key-help-dialog+))
|
||||
(fg (swconf:win-fg swconf:+key-help-dialog+)))
|
||||
(windows:make-blocking-message-dialog *main-window*
|
||||
nil
|
||||
(_ "Parent message")
|
||||
lines
|
||||
bg
|
||||
fg)))
|
||||
(let ((actual-lines '()))
|
||||
(loop for line in lines do
|
||||
(if (< (length line)
|
||||
new-window-width)
|
||||
(push line actual-lines)
|
||||
(let* ((words (split-words line))
|
||||
(formatted-lines (flush-left-mono-text words new-window-width)))
|
||||
(loop for formatted-line in formatted-lines do
|
||||
(push formatted-line actual-lines)))))
|
||||
(windows:make-blocking-message-dialog *main-window*
|
||||
nil
|
||||
(_ "Parent message")
|
||||
(nreverse actual-lines)
|
||||
bg
|
||||
fg))))
|
||||
|
|
Loading…
Reference in New Issue