Skip to content

Commit

Permalink
updated status-go
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-mut committed Jul 12, 2023
1 parent aff42a2 commit 4448e5d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 73 deletions.
61 changes: 4 additions & 57 deletions src/quo2/components/community/community_list_view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
[quo2.components.community.style :as style]
[quo2.components.counter.counter :as counter]
[quo2.components.icon :as icons]
[quo2.theme :as theme]
[quo2.components.markdown.text :as text]
[quo2.foundations.colors :as colors]
[quo2.components.community.icon :as community-icon]
Expand All @@ -22,63 +21,16 @@
:resize-mode :center
:size 20
:color (colors/theme-colors
colors/neutral-50
colors/neutral-40)}]
colors/neutral-40
colors/neutral-50)}]
(pos? unread-mentions-count)
[counter/counter {:type :default} unread-mentions-count]

unread-messages?
[unread-grey-dot :unviewed-messages-public]))

(defn communities-list-view-item
[props
{:keys [name
locked?
status
muted
unread-messages?
unread-mentions-count
community-icon
tokens]}]
[rn/view
{:style (merge (style/community-card 16)
{:margin-bottom 12})}
[rn/touchable-highlight
(merge {:style {:height 56
:border-radius 16}}
props)
[rn/view {:style style/detail-container}
[rn/view (style/list-info-container)
[community-icon/community-icon
{:images community-icon} 32]
[rn/view
{:flex 1
:margin-horizontal 12}
[text/text
{:weight :semi-bold
:size :paragraph-1
:accessibility-label :community-name-text
:number-of-lines 1
:ellipsize-mode :tail
:style {:color (when muted
(colors/theme-colors
colors/neutral-40
colors/neutral-60))}}
name]
[community-view/community-stats-column
{:type :list-view}]]
(if (= status :gated)
[community-view/permission-tag-container
{:locked? locked?
:tokens tokens}]
[notification-view
{:muted? muted
:unread-mentions-count unread-mentions-count
:unread-messages? unread-messages?}])]]]])

(defn communities-membership-list-item
[props
bottom-sheet?
{:keys [name
muted
unviewed-messages-count
Expand Down Expand Up @@ -107,17 +59,12 @@
:number-of-lines 1
:ellipsize-mode :tail
:weight :semi-bold
:size :paragraph-1
:style (when muted
{:color (if (theme/dark?)
colors/neutral-60
colors/neutral-40)})}
:size :paragraph-1}
name]]

[rn/view
{:justify-content :center
:margin-right (when bottom-sheet?
16)}
:margin-right 16}
(if (= status :gated)
[community-view/permission-tag-container
{:locked? locked?
Expand Down
28 changes: 14 additions & 14 deletions src/status_im2/contexts/communities/actions/chat/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@

(defn- action-toggle-muted
[id muted? muted-till chat-type]
(let [muted (and muted? (some? muted-till))
time-string (fn [duration-kw unmute-time]
(i18n/label duration-kw {:duration unmute-time}))]
{:icon :i/muted
:right-icon :i/chevron-right
:accessibility-label :chat-toggle-muted
:sub-label (when muted
(time-string :t/muted-until (datetime/format-mute-till muted-till)))
:on-press (if muted?
#(unmute-channel-action id)
#(mute-channel-action id chat-type muted?))
:label (i18n/label (if muted
:t/unmute-channel
:t/mute-channel))}))
(let [muted (and muted? (some? muted-till))]
(cond-> {:icon :i/muted
:accessibility-label :chat-toggle-muted
:sub-label (when muted
(str (i18n/label :t/muted-until)
" "
(datetime/format-mute-till muted-till)))
:on-press (if muted?
#(unmute-channel-action id)
#(mute-channel-action id chat-type muted?))
:label (i18n/label (if muted
:t/unmute-channel
:t/mute-channel))}
(not muted?) (assoc :right-icon :i/chevron-right))))

(defn- action-notification-settings
[]
Expand Down
4 changes: 2 additions & 2 deletions status-go-version.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"owner": "status-im",
"repo": "status-go",
"version": "ft/mute-community",
"commit-sha1": "6a7bc61a6e4bda06621f2f9fb76334dacad9d529",
"src-sha256": "0nn3n9xa0plrja59y7wx5sy2pam6r6jcf23fj941rcch762flplf"
"commit-sha1": "499320269a5724611cb8632a948c7f4b4d5c9d89",
"src-sha256": "06fim2gjn3xp66axdvlkn3r81axzsx6y6g0q1wrxrw3cifn7syl2"
}

0 comments on commit 4448e5d

Please sign in to comment.