diff --git a/src/status_im2/contexts/communities/actions/chat/view.cljs b/src/status_im2/contexts/communities/actions/chat/view.cljs index 9424def08d..c23057aab4 100644 --- a/src/status_im2/contexts/communities/actions/chat/view.cljs +++ b/src/status_im2/contexts/communities/actions/chat/view.cljs @@ -106,8 +106,8 @@ :label (i18n/label :t/share-channel)}) (defn actions - [{:keys [locked? id community-id]} inside-chat?] - (let [{:keys [muted muted-till chat-type]} (rf/sub [:chat-by-id (str community-id id)])] + [{:keys [locked? chat-id]} inside-chat?] + (let [{:keys [muted muted-till chat-type]} (rf/sub [:chat-by-id chat-id])] (cond locked? [quo/action-drawer @@ -120,7 +120,7 @@ [quo/action-drawer [[(action-view-members-and-details) (action-mark-as-read) - (action-toggle-muted (str community-id id) muted muted-till chat-type) + (action-toggle-muted chat-id muted muted-till chat-type) (action-notification-settings) (action-pinned-messages) (action-invite-people) @@ -132,7 +132,7 @@ [[(action-view-members-and-details) (action-token-requirements) (action-mark-as-read) - (action-toggle-muted (str community-id id) muted muted-till chat-type) + (action-toggle-muted chat-id muted muted-till chat-type) (action-notification-settings) (action-fetch-messages) (action-invite-people) diff --git a/src/status_im2/contexts/communities/overview/view.cljs b/src/status_im2/contexts/communities/overview/view.cljs index 9a772a9a19..753f4f6743 100644 --- a/src/status_im2/contexts/communities/overview/view.cljs +++ b/src/status_im2/contexts/communities/overview/view.cljs @@ -49,19 +49,21 @@ (oops/oget event "nativeEvent.layout.y")) (defn- channel-chat-item - [community-id community-color {chat-id :id muted? :muted? :as chat}] + [community-id community-color {:keys [:muted? id] :as chat}] (let [sheet-content [actions/chat-actions - (assoc chat :chat-type constants/community-chat-type) + (assoc chat + :chat-type constants/community-chat-type + :chat-id (str community-id id)) false] channel-sheet-data {:selected-item (fn [] [quo/channel-list-item chat]) :content (fn [] sheet-content)}] - [rn/view {:key chat-id :style {:margin-top 4}} + [rn/view {:key id :style {:margin-top 4}} [quo/channel-list-item (assoc chat :default-color community-color :on-long-press #(rf/dispatch [:show-bottom-sheet channel-sheet-data]) :muted? (or muted? - (rf/sub [:chat/check-channel-muted? community-id chat-id])))]])) + (rf/sub [:chat/check-channel-muted? community-id id])))]])) (defn channel-list-component [{:keys [on-category-layout community-id community-color on-first-channel-height-changed]} @@ -224,7 +226,7 @@ :on-long-press #(rf/dispatch [:show-bottom-sheet {:content (fn [] - [chat-actions/actions community-id id])}]) + [chat-actions/actions chat false])}]) :community-id community-id}))) (defn add-handlers-to-chats