Skip to content

Commit

Permalink
stop showing notification for mute community
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-mut committed Mar 14, 2023
1 parent ea0a6a4 commit 36502ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/quo2/components/list_items/channel.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -53,13 +53,15 @@
:no-color true}])
(when (and (not locked?)
(not muted?)
(not muted-community?)
(pos? (int mentions-count)))
[rn/view
{:style {:margin-right 2
:margin-top 2}}
[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])]]])
12 changes: 7 additions & 5 deletions src/status_im2/contexts/communities/overview/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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)]))

Expand Down Expand Up @@ -209,15 +209,16 @@
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
on-first-channel-height-changed]}]
(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)
Expand Down Expand Up @@ -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
[_]
Expand Down

0 comments on commit 36502ff

Please sign in to comment.