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!)
|
||||
|
||||
(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]
|
||||
(let [{:keys [open? close-fn open-fn]} state
|
||||
close-fn (fn []
|
||||
|
|
|
@ -55,4 +55,5 @@
|
|||
(defn stop []
|
||||
;; stop is called before any code is reloaded
|
||||
;; this is controlled by :before-load in the config
|
||||
(handler/stop!)
|
||||
(js/console.log "stop"))
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
[frontend.handler.editor :as editor-handler]
|
||||
[frontend.handler.ui :as ui-handler]
|
||||
[frontend.handler.web.nfs :as nfs]
|
||||
[frontend.modules.shortcut.core :as shortcut]
|
||||
[frontend.fs.watcher-handler :as fs-watcher-handler]
|
||||
[frontend.ui :as ui]
|
||||
[goog.object :as gobj]
|
||||
|
@ -179,5 +180,9 @@
|
|||
(reset! db/*sync-search-indice-f search/sync-search-indice!)
|
||||
(db/run-batch-txs!)
|
||||
(file-handler/run-writes-chan!)
|
||||
(shortcut/install-shortcuts!)
|
||||
(when (util/electron?)
|
||||
(el/listen!))))
|
||||
|
||||
(defn stop! []
|
||||
(shortcut/uninstall-shortcuts!))
|
||||
|
|
Loading…
Reference in New Issue