[16524] Fix chevron icon showing when chat is muted (#16528)
This commit is contained in:
parent
bcb55a1ab3
commit
2e397f0065
|
@ -139,7 +139,7 @@
|
||||||
#(mute-chat-action chat-id chat-type))
|
#(mute-chat-action chat-id chat-type))
|
||||||
:danger? false
|
:danger? false
|
||||||
:accessibility-label :mute-chat
|
:accessibility-label :mute-chat
|
||||||
:chevron? true})))
|
:chevron? (not muted?)})))
|
||||||
|
|
||||||
(defn mark-as-read-entry
|
(defn mark-as-read-entry
|
||||||
[chat-id needs-divider?]
|
[chat-id needs-divider?]
|
||||||
|
|
|
@ -47,17 +47,19 @@
|
||||||
(defn- action-toggle-muted
|
(defn- action-toggle-muted
|
||||||
[id muted? muted-till chat-type]
|
[id muted? muted-till chat-type]
|
||||||
(let [muted (and muted? (some? muted-till))]
|
(let [muted (and muted? (some? muted-till))]
|
||||||
{:icon :i/muted
|
(cond-> {:icon :i/muted
|
||||||
:right-icon :i/chevron-right
|
|
||||||
:accessibility-label :chat-toggle-muted
|
:accessibility-label :chat-toggle-muted
|
||||||
:sub-label (when muted
|
:sub-label (when muted
|
||||||
(str (i18n/label :t/muted-until) " " (datetime/format-mute-till muted-till)))
|
(str (i18n/label :t/muted-until)
|
||||||
|
" "
|
||||||
|
(datetime/format-mute-till muted-till)))
|
||||||
:on-press (if muted?
|
:on-press (if muted?
|
||||||
#(unmute-channel-action id)
|
#(unmute-channel-action id)
|
||||||
#(mute-channel-action id chat-type))
|
#(mute-channel-action id chat-type))
|
||||||
:label (i18n/label (if muted
|
:label (i18n/label (if muted
|
||||||
:t/unmute-channel
|
:t/unmute-channel
|
||||||
:t/mute-channel))}))
|
:t/mute-channel))}
|
||||||
|
(not muted?) (assoc :right-icon :i/chevron-right))))
|
||||||
|
|
||||||
(defn- action-notification-settings
|
(defn- action-notification-settings
|
||||||
[]
|
[]
|
||||||
|
|
Loading…
Reference in New Issue