Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarBasem committed Dec 6, 2022
1 parent 0bcbc6a commit 6391960
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/status_im2/subs/contact.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,20 @@
(map #(first (groups %)) (distinct (map f coll)))))

(re-frame/reg-sub
:contacts/add-members-sections
:<- [:contacts/current-chat-contacts]
:<- [:contacts/active]
(fn [[members contacts]]
(-> (reduce
(fn [acc contact]
(let [first-char (first (:alias contact))]
(if (get acc first-char)
(update-in acc [first-char :data] #(conj % contact))
(assoc acc first-char {:title first-char :data [contact]}))))
{}
(distinct-by :public-key (concat members contacts)))
sort
vals)))
:contacts/add-members-sections
:<- [:contacts/current-chat-contacts]
:<- [:contacts/active]
(fn [[members contacts]]
(-> (reduce
(fn [acc contact]
(let [first-char (first (:alias contact))]
(if (get acc first-char)
(update-in acc [first-char :data] #(conj % contact))
(assoc acc first-char {:title first-char :data [contact]}))))
{}
(distinct-by :public-key (concat members contacts)))
sort
vals)))

(re-frame/reg-sub
:contacts/sorted-contacts
Expand Down

0 comments on commit 6391960

Please sign in to comment.