Fixed an issue with uninstalling non-active extensions
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
This commit is contained in:
parent
2d5c4e3892
commit
3c04982616
|
@ -29,10 +29,12 @@
|
||||||
(update-hooks hooks/hook-in extension-key))))
|
(update-hooks hooks/hook-in extension-key))))
|
||||||
|
|
||||||
(fx/defn remove-from-registry
|
(fx/defn remove-from-registry
|
||||||
[{:keys [db] :as cofx} extension-key]
|
[cofx extension-key]
|
||||||
|
(let [extensions (get-in cofx [:db :account/account :extensions])]
|
||||||
(fx/merge cofx
|
(fx/merge cofx
|
||||||
(update-hooks hooks/unhook extension-key)
|
(when (get-in extensions [extension-key :active?])
|
||||||
{:db (update-in db [:account/account :extensions] dissoc extension-key)}))
|
(update-hooks hooks/unhook extension-key))
|
||||||
|
{:db (update-in cofx [:db :account/account :extensions] dissoc extension-key)})))
|
||||||
|
|
||||||
(fx/defn change-state
|
(fx/defn change-state
|
||||||
[cofx extension-key active?]
|
[cofx extension-key active?]
|
||||||
|
|
Loading…
Reference in New Issue