This commit is contained in:
parent
1b6112a9bd
commit
b8a491e66d
|
@ -42,9 +42,7 @@
|
|||
(defn- save-contacts
|
||||
[identities contacts]
|
||||
(doseq [contact-identity identities]
|
||||
(if-let [contact (.find contacts (fn [object _ _]
|
||||
(= contact-identity (aget object "identity"))))]
|
||||
(.push contacts (clj->js {:identity contact-identity})))))
|
||||
(.push contacts (clj->js {:identity contact-identity}))))
|
||||
|
||||
(defn add-contacts
|
||||
[group-id identities]
|
||||
|
|
|
@ -284,7 +284,7 @@
|
|||
(fn [db [_ new-groups]]
|
||||
(-> db
|
||||
(update :contact-groups merge (map #(vector (:group-id %) %) new-groups))
|
||||
(assoc db :new-groups new-groups))))
|
||||
(assoc :new-groups new-groups))))
|
||||
|
||||
(register-handler :save-group-order
|
||||
(u/side-effect!
|
||||
|
@ -317,7 +317,7 @@
|
|||
(defn add-selected-contacts-to-group
|
||||
[{:keys [selected-contacts contact-groups contact-group-id] :as db} _]
|
||||
(let [new-identities (mapv #(hash-map :identity %) selected-contacts)]
|
||||
(update db [:contact-groups contact-group-id :contacts] concat new-identities)))
|
||||
(update-in db [:contact-groups contact-group-id :contacts] concat new-identities)))
|
||||
|
||||
(defn add-selected-contacts-to-group!
|
||||
[{:keys [contact-group-id selected-contacts]} _]
|
||||
|
|
Loading…
Reference in New Issue