1
0
Fork 0

- prevented to replace a post's content with an empty text.

This commit is contained in:
cage 2024-07-20 18:30:48 +02:00
parent 97988ec705
commit 36e380f31e
1 changed files with 22 additions and 20 deletions

View File

@ -2099,6 +2099,8 @@
(croatoan:end-screen) (croatoan:end-screen)
(tui:with-notify-errors (tui:with-notify-errors
(os-utils:open-with-editor temp-file)) (os-utils:open-with-editor temp-file))
(when (> (fs:file-size temp-file)
0)
(let ((new-content (fs:slurp-file temp-file))) (let ((new-content (fs:slurp-file temp-file)))
(ui:notify (_ "Editing post…")) (ui:notify (_ "Editing post…"))
(client:edit-status status-id new-content nil nil nil nil) (client:edit-status status-id new-content nil nil nil nil)
@ -2117,7 +2119,7 @@
(push-event refresh-event) (push-event refresh-event)
(with-enqueued-process (+minimum-event-priority+) (with-enqueued-process (+minimum-event-priority+)
(ui:thread-open-selected-message) (ui:thread-open-selected-message)
(ui:notify (_ "Post modified"))))))))) (ui:notify (_ "Post modified"))))))))))
;;;; end events ;;;; end events