mirror of https://github.com/logseq/logseq
enhance: reload commands when toggle any plugin
parent
78eb7718ed
commit
179a8de37e
|
@ -12,6 +12,7 @@
|
|||
[frontend.components.svg :as svg]
|
||||
[frontend.handler.notification :as notification]
|
||||
[frontend.handler.plugin :as plugin-handler]
|
||||
[frontend.handler.page :as page-handler]
|
||||
[clojure.string :as string]))
|
||||
|
||||
(rum/defcs installed-themes
|
||||
|
@ -248,7 +249,8 @@
|
|||
|
||||
(ui/toggle (not disabled)
|
||||
(fn []
|
||||
(js-invoke js/LSPluginCore (if disabled "enable" "disable") id))
|
||||
(js-invoke js/LSPluginCore (if disabled "enable" "disable") id)
|
||||
(page-handler/init-commands!))
|
||||
true)]])]])))
|
||||
|
||||
(rum/defcs marketplace-plugins
|
||||
|
|
|
@ -652,13 +652,3 @@
|
|||
(defn open-file-in-directory []
|
||||
(when-let [file-path (and (util/electron?) (get-page-file-path))]
|
||||
(js/window.apis.showItemInFolder file-path)))
|
||||
|
||||
;; Commander
|
||||
(defonce *slash-commander-watcher? (atom false))
|
||||
|
||||
(when-not @*slash-commander-watcher?
|
||||
(add-watch commands/*show-commands :slash-commander-watcher
|
||||
(fn [_ _ old-state new-state]
|
||||
(when (and (not old-state) new-state)
|
||||
(init-commands!))))
|
||||
(reset! *slash-commander-watcher? true))
|
||||
|
|
Loading…
Reference in New Issue