Changes in how we update extensions: don't check for URL to be different

Signed-off-by: Aleksandr Pantiukhov <alwxndr@gmail.com>
This commit is contained in:
Aleksandr Pantiukhov 2018-10-25 10:11:50 +02:00
parent 0bc9fb6d9d
commit 0ee07ca72c
No known key found for this signature in database
GPG Key ID: 153E4F21734042F5
1 changed files with 4 additions and 10 deletions

View File

@ -356,16 +356,10 @@
#(toggle-fn id %))))
(fx/defn load
[cofx url]
(if (->> (get-in cofx [:db :account/account :extensions])
vals
(filter #(= (:url %) (string/trim url)))
first)
{:utils/show-popup {:title (i18n/label :t/error)
:content (i18n/label :t/extension-is-already-added)}}
{:extensions/load {:extensions [{:url (string/trim url)
:active? true}]
:follow-up :extensions/stage}}))
[_ url]
{:extensions/load {:extensions [{:url (string/trim url)
:active? true}]
:follow-up :extensions/stage}})
(fx/defn activate-extensions
[{{:account/keys [account]} :db}]