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