mirror of https://github.com/logseq/logseq
fix: can't exit window
parent
18025a254c
commit
673d29d114
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue