mirror of https://github.com/logseq/logseq
fix: move shortcut install to handler start
parent
212e2592d1
commit
fd0742b1f3
|
@ -276,12 +276,6 @@
|
||||||
(state/hide-custom-context-menu!)
|
(state/hide-custom-context-menu!)
|
||||||
|
|
||||||
(editor-handler/clear-selection! e)))))
|
(editor-handler/clear-selection! e)))))
|
||||||
{:did-mount (fn [state]
|
|
||||||
(shortcut/install-shortcuts!)
|
|
||||||
state)
|
|
||||||
:will-unmount (fn [state]
|
|
||||||
(shortcut/uninstall-shortcuts!)
|
|
||||||
state)}
|
|
||||||
[state route-match main-content]
|
[state route-match main-content]
|
||||||
(let [{:keys [open? close-fn open-fn]} state
|
(let [{:keys [open? close-fn open-fn]} state
|
||||||
close-fn (fn []
|
close-fn (fn []
|
||||||
|
|
|
@ -55,4 +55,5 @@
|
||||||
(defn stop []
|
(defn stop []
|
||||||
;; stop is called before any code is reloaded
|
;; stop is called before any code is reloaded
|
||||||
;; this is controlled by :before-load in the config
|
;; this is controlled by :before-load in the config
|
||||||
|
(handler/stop!)
|
||||||
(js/console.log "stop"))
|
(js/console.log "stop"))
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
[frontend.handler.editor :as editor-handler]
|
[frontend.handler.editor :as editor-handler]
|
||||||
[frontend.handler.ui :as ui-handler]
|
[frontend.handler.ui :as ui-handler]
|
||||||
[frontend.handler.web.nfs :as nfs]
|
[frontend.handler.web.nfs :as nfs]
|
||||||
|
[frontend.modules.shortcut.core :as shortcut]
|
||||||
[frontend.fs.watcher-handler :as fs-watcher-handler]
|
[frontend.fs.watcher-handler :as fs-watcher-handler]
|
||||||
[frontend.ui :as ui]
|
[frontend.ui :as ui]
|
||||||
[goog.object :as gobj]
|
[goog.object :as gobj]
|
||||||
|
@ -179,5 +180,9 @@
|
||||||
(reset! db/*sync-search-indice-f search/sync-search-indice!)
|
(reset! db/*sync-search-indice-f search/sync-search-indice!)
|
||||||
(db/run-batch-txs!)
|
(db/run-batch-txs!)
|
||||||
(file-handler/run-writes-chan!)
|
(file-handler/run-writes-chan!)
|
||||||
|
(shortcut/install-shortcuts!)
|
||||||
(when (util/electron?)
|
(when (util/electron?)
|
||||||
(el/listen!))))
|
(el/listen!))))
|
||||||
|
|
||||||
|
(defn stop! []
|
||||||
|
(shortcut/uninstall-shortcuts!))
|
||||||
|
|
Loading…
Reference in New Issue