Skip to content

Commit

Permalink
fix qa issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Parveshdhull committed Jan 10, 2024
1 parent c755025 commit d205f9b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/status_im/contexts/chat/group_details/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
{:keys [admins chat-id chat-name color public?
muted contacts]
:as group} (rf/sub [:chats/chat-by-id chat-id])
members (rf/sub [:contacts/group-members-sections])
members (rf/sub [:contacts/group-members-sections chat-id])
pinned-messages (rf/sub [:chats/pinned chat-id])
current-pk (rf/sub [:multiaccount/public-key])
admin? (get admins current-pk)]
Expand Down
14 changes: 8 additions & 6 deletions src/status_im/subs/contact.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,12 @@

(re-frame/reg-sub
:contacts/contacts-by-chat
(fn [[_ _ chat-id] _]
(fn [[_ chat-id]]
[(re-frame/subscribe [:chats/chat chat-id])
(re-frame/subscribe [:contacts/contacts])])
(fn [[chat all-contacts] [_ query-fn]]
(contact.db/query-chat-contacts chat all-contacts query-fn)))
(re-frame/subscribe [:contacts/contacts])
(re-frame/subscribe [:profile/profile])])
(fn [[{:keys [contacts admins]} all-contacts current-multiaccount]]
(contact.db/get-all-contacts-in-group-chat contacts admins all-contacts current-multiaccount)))

(re-frame/reg-sub
:contacts/contact-by-address
Expand Down Expand Up @@ -316,8 +317,9 @@

(re-frame/reg-sub
:contacts/group-members-sections
:<- [:contacts/current-chat-contacts]
(fn [members]
(fn [[_ chat-id]]
[(re-frame/subscribe [:contacts/contacts-by-chat chat-id])])
(fn [[members]]
(let [admins (filter :admin? members)
online (filter #(and (not (:admin? %)) (:online? %)) members)
offline (filter #(and (not (:admin? %)) (not (:online? %))) members)]
Expand Down

0 comments on commit d205f9b

Please sign in to comment.