fix: can't exit window

pull/10683/head
Tienson Qin 2023-12-21 21:11:57 +08:00
parent 18025a254c
commit 673d29d114
1 changed files with 1 additions and 6 deletions

View File

@ -9,7 +9,6 @@
["url" :as URL]
[electron.state :as state]
[cljs-bean.core :as bean]
[clojure.core.async :as async]
[clojure.string :as string]))
(defonce *quitting? (atom false))
@ -94,11 +93,7 @@
(let [web-contents (. win -webContents)]
(.send web-contents "persist-zoom-level" (.getZoomLevel web-contents))
(.send web-contents "persistent-dbs"))
(async/go
(let [_ (async/<! state/persistent-dbs-chan)]
(destroy-window! win)
(when @*quitting?
(async/put! state/persistent-dbs-chan true)))))
(destroy-window! win))
(defn on-close-actions!
;; TODO merge with the on close in core