1
0
Fork 0

- optimized status editing.

This commit is contained in:
cage 2024-06-28 15:02:17 +02:00
parent 1f14329852
commit ee9f9c03c7
2 changed files with 16 additions and 7 deletions

View File

@ -472,8 +472,8 @@ Returns nil if the user did not provided a server in the configuration file"
(defun tag-name (tag &key (return-empty-string-if-nil nil))
"Returns a convevient tag name from `tooter:tag'.
if `return-empty-string-if-nil' is non nil an apty tag (nil) will
become an emty string (\"\")
if `return-empty-string-if-nil' is non nil no tag name (nil) will
become an empty string (\"\")
"
(let ((name (tooter:name tag)))
(or name

View File

@ -2098,11 +2098,20 @@
(client:edit-status status-id new-content nil nil nil nil)
(db:remove-from-status-ignored status-id folder timeline)
(db::delete-status timeline folder status-id)
(client:fetch-remote-status status-id folder timeline)
(ui:refresh-thread)
(with-enqueued-process (+minimum-event-priority+)
(ui:thread-open-selected-message)
(ui:notify (_ "Post modified"))))))))
(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