enhance: reload commands when toggle any plugin

This commit is contained in:
Tienson Qin
2021-11-04 17:53:57 +08:00
parent 78eb7718ed
commit 179a8de37e
2 changed files with 4 additions and 12 deletions

View File

@@ -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)
nil)