diff --git a/src/main/frontend/components/plugins.cljs b/src/main/frontend/components/plugins.cljs index 929227bcc..e713a8e85 100644 --- a/src/main/frontend/components/plugins.cljs +++ b/src/main/frontend/components/plugins.cljs @@ -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 @@ -428,4 +430,4 @@ (or (not util/nfs?) nfs-granted?)) (ui-handler/exec-js-if-exists-&-allowed! t))) [current-repo db-restoring? nfs-granted?]) - nil) \ No newline at end of file + nil) diff --git a/src/main/frontend/handler/page.cljs b/src/main/frontend/handler/page.cljs index 3c4e8185d..a65a09350 100644 --- a/src/main/frontend/handler/page.cljs +++ b/src/main/frontend/handler/page.cljs @@ -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))