1
0
Fork 0

Compare commits

...

2 Commits

Author SHA1 Message Date
cage 36e380f31e - prevented to replace a post's content with an empty text. 2024-07-20 18:30:48 +02:00
cage 97988ec705 - modified default GUI theme. 2024-07-20 18:27:31 +02:00
2 changed files with 27 additions and 25 deletions

View File

@ -51,15 +51,15 @@ gemini.main-window.text.padding = 5
# links
gemini.link.foreground = #5b4636
gemini.link.foreground = #0061e0
gemini.link.background = #f4ecd8
gemini.link.font = "Sans"
gemini.link.size = 12
gemini.link.size = 11
gemini.link.weight = bold
gemini.link.weight = normal
gemini.link.slant = roman
@ -81,7 +81,7 @@ gemini.quote.background = #f4ecd8
gemini.quote.font = Serif
gemini.quote.size = 12
gemini.quote.size = 11
gemini.quote.weight = normal
@ -147,7 +147,7 @@ gemini.h3.font = Sans
gemini.h3.size = 12
gemini.h3.weight = normal
gemini.h3.weight = bold
gemini.h3.slant = roman

View File

@ -2098,26 +2098,28 @@
(write-sequence text stream))
(croatoan:end-screen)
(tui:with-notify-errors
(os-utils:open-with-editor temp-file))
(let ((new-content (fs:slurp-file temp-file)))
(ui:notify (_ "Editing post…"))
(client:edit-status status-id new-content nil nil nil nil)
(db:remove-from-status-ignored status-id folder timeline)
(db:remove-status-row timeline folder status-id)
(let* ((refresh-event (make-instance 'refresh-thread-windows-event
:priority (1+ +standard-event-priority+)
:message-status-id status-id))
(remote-edited-status (client:get-remote-status status-id))
(save-event (make-instance 'program-events:save-timeline-in-db-event
:payload (list remote-edited-status)
:timeline-type timeline
:folder folder
:force-saving-of-ignored-status t)))
(push-event save-event)
(push-event refresh-event)
(with-enqueued-process (+minimum-event-priority+)
(ui:thread-open-selected-message)
(ui:notify (_ "Post modified")))))))))
(os-utils:open-with-editor temp-file))
(when (> (fs:file-size temp-file)
0)
(let ((new-content (fs:slurp-file temp-file)))
(ui:notify (_ "Editing post…"))
(client:edit-status status-id new-content nil nil nil nil)
(db:remove-from-status-ignored status-id folder timeline)
(db:remove-status-row timeline folder status-id)
(let* ((refresh-event (make-instance 'refresh-thread-windows-event
:priority (1+ +standard-event-priority+)
:message-status-id status-id))
(remote-edited-status (client:get-remote-status status-id))
(save-event (make-instance 'program-events:save-timeline-in-db-event
:payload (list remote-edited-status)
:timeline-type timeline
:folder folder
:force-saving-of-ignored-status t)))
(push-event save-event)
(push-event refresh-event)
(with-enqueued-process (+minimum-event-priority+)
(ui:thread-open-selected-message)
(ui:notify (_ "Post modified"))))))))))
;;;; end events