mirror of https://codeberg.org/cage/tinmop/
- prevented quitting program when users does not input a valid answer at prompt asking for deleting pleroma messages.
This commit is contained in:
parent
5f4789be79
commit
2d03b99e99
|
@ -18,7 +18,8 @@
|
|||
(in-package :ui-goodies)
|
||||
|
||||
(defun boolean-input-accepted-p (user-input)
|
||||
(string-equal user-input (_ "y")))
|
||||
(values (string-equal user-input (_ "y"))
|
||||
(string-not-empty-p user-input)))
|
||||
|
||||
(defun open-manual ()
|
||||
#+man-bin
|
||||
|
@ -74,12 +75,15 @@
|
|||
(defun clean-close-program ()
|
||||
"Use this to close the program"
|
||||
(flet ((on-input-complete (maybe-accepted)
|
||||
(if (boolean-input-accepted-p maybe-accepted)
|
||||
(multiple-value-bind (y-pressed-p not-null-input-p)
|
||||
(boolean-input-accepted-p maybe-accepted)
|
||||
(when not-null-input-p
|
||||
(if y-pressed-p
|
||||
(let ((delete-event (make-instance 'delete-all-status-event)))
|
||||
(push-event delete-event))
|
||||
(db-utils:with-ready-database (:connect nil)
|
||||
(db:renumber-all-timelines '())))
|
||||
(clean-temporary-files)))
|
||||
(clean-temporary-files)))))
|
||||
(let ((delete-count (db:count-status-marked-to-delete))
|
||||
(stop-download-event (make-instance 'gemini-abort-all-downloading-event
|
||||
:priority +maximum-event-priority+)))
|
||||
|
|
Loading…
Reference in New Issue