|
38 | 38 | unread-messages?
|
39 | 39 | [unread-grey-dot :unviewed-messages-public])])
|
40 | 40 |
|
41 |
| -(defn communities-list-view-item |
42 |
| - [{:keys [customization-color] :as props} |
43 |
| - {:keys [name locked? status muted unread-messages? unread-mentions-count community-icon tokens]}] |
44 |
| - (let [theme (quo.theme/use-theme)] |
45 |
| - [rn/view |
46 |
| - {:style (merge (style/community-card 16 theme) |
47 |
| - {:margin-bottom 12})} |
48 |
| - [rn/touchable-highlight |
49 |
| - (merge {:style {:height 56 |
50 |
| - :border-radius 16}} |
51 |
| - props) |
52 |
| - [rn/view {:style style/detail-container} |
53 |
| - [rn/view (style/list-info-container) |
54 |
| - [community-icon/community-icon |
55 |
| - {:images community-icon} 32] |
56 |
| - [rn/view |
57 |
| - {:flex 1 |
58 |
| - :margin-horizontal 12} |
59 |
| - [text/text |
60 |
| - {:weight :semi-bold |
61 |
| - :size :paragraph-1 |
62 |
| - :accessibility-label :community-name-text |
63 |
| - :number-of-lines 1 |
64 |
| - :ellipsize-mode :tail |
65 |
| - :style {:color (when muted |
66 |
| - (colors/theme-colors |
67 |
| - colors/neutral-40 |
68 |
| - colors/neutral-60 |
69 |
| - theme))}} |
70 |
| - name] |
71 |
| - [community-view/community-stats-column |
72 |
| - {:type :list-view}]] |
73 |
| - (if (= status :gated) |
74 |
| - [community-view/permission-tag-container |
75 |
| - {:locked? locked? |
76 |
| - :tokens tokens}] |
77 |
| - [notification-view |
78 |
| - {:customization-color customization-color |
79 |
| - :theme theme |
80 |
| - :muted? muted |
81 |
| - :unread-mentions-count unread-mentions-count |
82 |
| - :unread-messages? unread-messages?}])]]]])) |
| 41 | +(defn- title-color |
| 42 | + [unread-messages? muted theme] |
| 43 | + (cond |
| 44 | + muted (colors/theme-colors colors/neutral-40 colors/neutral-60 theme) |
| 45 | + unread-messages? (colors/theme-colors colors/neutral-100 colors/white theme) |
| 46 | + :else (colors/theme-colors colors/neutral-50 colors/neutral-40 theme))) |
83 | 47 |
|
84 | 48 | (defn communities-membership-list-item
|
85 | 49 | [{:keys [customization-color] :as props}
|
86 | 50 | bottom-sheet?
|
87 | 51 | {:keys [name muted unviewed-messages-count unviewed-mentions-count status
|
88 | 52 | images tokens locked? style]}]
|
89 |
| - (let [theme (quo.theme/use-theme)] |
| 53 | + (let [theme (quo.theme/use-theme) |
| 54 | + unread-messages? (pos? unviewed-messages-count)] |
90 | 55 | [rn/touchable-highlight
|
91 | 56 | (merge {:underlay-color (colors/theme-colors
|
92 | 57 | colors/neutral-5
|
|
108 | 73 | :ellipsize-mode :tail
|
109 | 74 | :weight :semi-bold
|
110 | 75 | :size :paragraph-1
|
111 |
| - :style (when muted |
112 |
| - {:color (colors/theme-colors |
113 |
| - colors/neutral-40 |
114 |
| - colors/neutral-60 |
115 |
| - theme)})} |
| 76 | + :style {:color (title-color unread-messages? muted theme)}} |
116 | 77 | name]]
|
117 | 78 |
|
118 | 79 | [rn/view
|
|
128 | 89 | :customization-color customization-color
|
129 | 90 | :muted? muted
|
130 | 91 | :unread-mentions-count unviewed-mentions-count
|
131 |
| - :unread-messages? (pos? unviewed-messages-count)}])]]])) |
| 92 | + :unread-messages? unread-messages?}])]]])) |
0 commit comments