diff --git a/src/quo2/components/list_items/channel.cljs b/src/quo2/components/list_items/channel.cljs index 3023cf6ac03..8dd52d516e8 100644 --- a/src/quo2/components/list_items/channel.cljs +++ b/src/quo2/components/list_items/channel.cljs @@ -11,7 +11,7 @@ (defn list-item [{:keys [name locked? mentions-count unread-messages? muted? is-active-channel? emoji channel-color on-press] - :or {channel-color colors/primary-50}}] + :or {channel-color colors/primary-50}} muted-community?] [rn/touchable-opacity {:on-press on-press} [rn/view {:style (merge {:height 48 @@ -53,6 +53,7 @@ :no-color true}]) (when (and (not locked?) (not muted?) + (not muted-community?) (pos? (int mentions-count))) [rn/view {:style {:margin-right 2 @@ -60,6 +61,7 @@ [quo2.counter/counter {:override-bg-color channel-color} mentions-count]]) (when (and (not locked?) (not muted?) + (not muted-community?) (not (pos? (int mentions-count))) unread-messages?) [unread-grey-dot])]]]) diff --git a/src/status_im2/contexts/communities/overview/view.cljs b/src/status_im2/contexts/communities/overview/view.cljs index 99c6ba799c8..16295cbe985 100644 --- a/src/status_im2/contexts/communities/overview/view.cljs +++ b/src/status_im2/contexts/communities/overview/view.cljs @@ -69,7 +69,7 @@ (defn channel-list-component [{:keys [on-categories-heights-changed on-first-channel-height-changed]} - channels-list] + channels-list muted-community?] (let [categories-heights (reagent/atom [])] [rn/view {:on-layout #(on-first-channel-height-changed (+ (if platform/ios? @@ -97,7 +97,7 @@ [rn/view {:key (:id channel) :margin-top 4} - [quo/channel-list-item channel]]) + [quo/channel-list-item channel muted-community?]]) channels-for-category)]]) channels-list)])) @@ -209,7 +209,7 @@ description]) (defn community-content - [{:keys [name description locked joined images + [{:keys [name description locked joined images muted status tokens tags requested-to-join-at id] :as community} {:keys [on-categories-heights-changed @@ -217,7 +217,8 @@ (let [pending? (pos? requested-to-join-at) thumbnail-image (get-in images [:thumbnail]) chats-by-category (rf/sub [:communities/categorized-channels id]) - users (rf/sub [:communities/users id])] + users (rf/sub [:communities/users id]) + muted-community? muted] [rn/view [rn/view {:padding-horizontal 20} (when (and (not joined) @@ -257,7 +258,8 @@ [channel-list-component {:on-categories-heights-changed #(on-categories-heights-changed %) :on-first-channel-height-changed #(on-first-channel-height-changed %)} - (add-on-press-handler-to-categorized-chats id chats-by-category)]])) + (add-on-press-handler-to-categorized-chats id chats-by-category) + muted-community?]])) (defn sticky-category-header [_]