fix: channel list-item not clickable (#14469)
This commit is contained in:
parent
2e68fb22f5
commit
f3ad8beb6d
|
@ -10,48 +10,48 @@
|
||||||
(defn list-item [{:keys [name locked? mentions-count unread-messages?
|
(defn list-item [{:keys [name locked? mentions-count unread-messages?
|
||||||
muted? is-active-channel? emoji channel-color on-press]
|
muted? is-active-channel? emoji channel-color on-press]
|
||||||
:or {channel-color colors/primary-50}}]
|
:or {channel-color colors/primary-50}}]
|
||||||
[rn/view {:style (merge {:height 48
|
[rn/touchable-opacity {:on-press on-press}
|
||||||
:display :flex
|
[rn/view {:style (merge {:height 48
|
||||||
:border-radius 12
|
:display :flex
|
||||||
:flex-direction :row
|
:border-radius 12
|
||||||
:justify-content :space-between
|
:flex-direction :row
|
||||||
:align-items :center
|
:justify-content :space-between
|
||||||
:width "100%"
|
:align-items :center
|
||||||
:padding-left 12
|
:width "100%"
|
||||||
:padding-right 12}
|
:padding-left 12
|
||||||
(when is-active-channel?
|
:padding-right 12}
|
||||||
{:background-color (colors/theme-alpha channel-color 0.05 0.05)}))
|
(when is-active-channel?
|
||||||
:on-press on-press}
|
{:background-color (colors/theme-alpha channel-color 0.05 0.05)}))}
|
||||||
[rn/view {:display :flex
|
[rn/view {:display :flex
|
||||||
:flex-direction :row
|
:flex-direction :row
|
||||||
:justify-content :flex-start
|
:justify-content :flex-start
|
||||||
:align-items :center}
|
:align-items :center}
|
||||||
[channel-avatar/channel-avatar
|
[channel-avatar/channel-avatar
|
||||||
{:big? true
|
{:big? true
|
||||||
:locked? locked?
|
:locked? locked?
|
||||||
:emoji-background-color (colors/theme-alpha channel-color 0.1 0.1)
|
:emoji-background-color (colors/theme-alpha channel-color 0.1 0.1)
|
||||||
:emoji emoji}]
|
:emoji emoji}]
|
||||||
[quo2.text/text
|
[quo2.text/text
|
||||||
{:style (merge {:margin-left 12}
|
{:style (merge {:margin-left 12}
|
||||||
(when (and (not locked?) muted?)
|
(when (and (not locked?) muted?)
|
||||||
{:color (if (theme/dark?) colors/neutral-60 colors/neutral-40)}))
|
{:color (if (theme/dark?) colors/neutral-60 colors/neutral-40)}))
|
||||||
:weight :medium :size :paragraph-1} (str "# " name)]]
|
:weight :medium :size :paragraph-1} (str "# " name)]]
|
||||||
[rn/view {:style {:height 20}}
|
[rn/view {:style {:height 20}}
|
||||||
(when (and (not locked?)
|
(when (and (not locked?)
|
||||||
muted?)
|
muted?)
|
||||||
[quo2.icons/icon :i/muted
|
[quo2.icons/icon :i/muted
|
||||||
{:size 20
|
{:size 20
|
||||||
:no-color true}])
|
:no-color true}])
|
||||||
(when (and (not locked?)
|
(when (and (not locked?)
|
||||||
(not muted?)
|
(not muted?)
|
||||||
(pos? (int mentions-count)))
|
(pos? (int mentions-count)))
|
||||||
[rn/view {:style {:margin-right 2
|
[rn/view {:style {:margin-right 2
|
||||||
:margin-top 2}}
|
:margin-top 2}}
|
||||||
[quo2.counter/counter {:override-bg-color channel-color} mentions-count]])
|
[quo2.counter/counter {:override-bg-color channel-color} mentions-count]])
|
||||||
(when (and (not locked?)
|
(when (and (not locked?)
|
||||||
(not muted?)
|
(not muted?)
|
||||||
(not (pos? (int mentions-count)))
|
(not (pos? (int mentions-count)))
|
||||||
unread-messages?)
|
unread-messages?)
|
||||||
[quo2.icons/icon :i/channel-notification
|
[quo2.icons/icon :i/channel-notification
|
||||||
{:size 20
|
{:size 20
|
||||||
:no-color true}])]])
|
:no-color true}])]]])
|
||||||
|
|
Loading…
Reference in New Issue