[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))
|
||||
:danger? false
|
||||
:accessibility-label :mute-chat
|
||||
:chevron? true})))
|
||||
:chevron? (not muted?)})))
|
||||
|
||||
(defn mark-as-read-entry
|
||||
[chat-id needs-divider?]
|
||||
|
|
|
@ -47,17 +47,19 @@
|
|||
(defn- action-toggle-muted
|
||||
[id muted? muted-till chat-type]
|
||||
(let [muted (and muted? (some? muted-till))]
|
||||
{:icon :i/muted
|
||||
:right-icon :i/chevron-right
|
||||
: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))
|
||||
:label (i18n/label (if muted
|
||||
:t/unmute-channel
|
||||
:t/mute-channel))}))
|
||||
(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))
|
||||
:label (i18n/label (if muted
|
||||
:t/unmute-channel
|
||||
:t/mute-channel))}
|
||||
(not muted?) (assoc :right-icon :i/chevron-right))))
|
||||
|
||||
(defn- action-notification-settings
|
||||
[]
|
||||
|
|
Loading…
Reference in New Issue