|
25 | 25 | {:community-id id}])})
|
26 | 26 |
|
27 | 27 | (defn view-rules
|
28 |
| - [id] |
| 28 | + [id intro-message] |
29 | 29 | {:icon :i/bullet-list
|
30 | 30 | :right-icon :i/chevron-right
|
31 | 31 | :accessibility-label :view-community-rules
|
32 | 32 | :on-press #(rf/dispatch [:show-bottom-sheet
|
33 |
| - {:content (fn [] [see-rules/view id])}]) |
| 33 | + {:content (fn [] [see-rules/view id intro-message])}]) |
34 | 34 | :label (i18n/label :t/view-community-rules)})
|
35 | 35 |
|
36 | 36 | (defn view-token-gating
|
|
131 | 131 | request-id])}])})
|
132 | 132 |
|
133 | 133 | (defn not-joined-options
|
134 |
| - [id token-gated? pending?] |
| 134 | + [id token-gated? pending? intro-message] |
135 | 135 | [[(when-not token-gated? (view-members id))
|
136 |
| - (when-not token-gated? (view-rules id)) |
| 136 | + (when-not token-gated? (view-rules id intro-message)) |
137 | 137 | (invite-contacts id)
|
138 | 138 | (when token-gated? (view-token-gating id))
|
139 | 139 | (when (and pending? (ff/enabled? ::ff/community.edit-account-selection))
|
|
142 | 142 | (share-community id)]])
|
143 | 143 |
|
144 | 144 | (defn join-request-sent-options
|
145 |
| - [id token-gated? request-id] |
146 |
| - [(conj (first (not-joined-options id token-gated? request-id)) |
| 145 | + [id token-gated? request-id intro-message] |
| 146 | + [(conj (first (not-joined-options id token-gated? request-id intro-message)) |
147 | 147 | (assoc (cancel-request-to-join id request-id) :add-divider? true))])
|
148 | 148 |
|
149 | 149 | (defn banned-options
|
150 |
| - [id token-gated?] |
| 150 | + [id token-gated? intro-message] |
151 | 151 | (let [pending? false]
|
152 |
| - (not-joined-options id token-gated? pending?))) |
| 152 | + (not-joined-options id token-gated? pending? intro-message))) |
153 | 153 |
|
154 | 154 | (defn joined-options
|
155 |
| - [id token-gated? muted? muted-till color] |
| 155 | + [id token-gated? muted? muted-till color intro-message] |
156 | 156 | [[(view-members id)
|
157 |
| - (view-rules id) |
| 157 | + (view-rules id intro-message) |
158 | 158 | (when token-gated? (view-token-gating id))
|
159 | 159 | (when (ff/enabled? ::ff/community.edit-account-selection)
|
160 | 160 | (edit-shared-addresses id))
|
|
167 | 167 | [(assoc (leave-community id color) :add-divider? true)]])
|
168 | 168 |
|
169 | 169 | (defn owner-options
|
170 |
| - [id token-gated? muted? muted-till] |
| 170 | + [id token-gated? muted? muted-till intro-message] |
171 | 171 | [[(view-members id)
|
172 |
| - (view-rules id) |
| 172 | + (view-rules id intro-message) |
173 | 173 | (when token-gated? (view-token-gating id))
|
174 | 174 | (mark-as-read id)
|
175 | 175 | (mute-community id muted? muted-till)
|
|
181 | 181 | (defn get-context-drawers
|
182 | 182 | [{:keys [id]}]
|
183 | 183 | (let [{:keys [token-permissions admin joined
|
184 |
| - muted banList muted-till color]} (rf/sub [:communities/community id]) |
185 |
| - request-id (rf/sub [:communities/my-pending-request-to-join id])] |
| 184 | + muted banList muted-till color |
| 185 | + intro-message]} (rf/sub [:communities/community id]) |
| 186 | + request-id (rf/sub [:communities/my-pending-request-to-join id])] |
186 | 187 | (cond
|
187 |
| - admin (owner-options id token-permissions muted muted-till) |
188 |
| - joined (joined-options id token-permissions muted muted-till color) |
189 |
| - request-id (join-request-sent-options id token-permissions request-id) |
190 |
| - banList (banned-options id token-permissions) |
191 |
| - :else (not-joined-options id token-permissions request-id)))) |
| 188 | + admin (owner-options id token-permissions muted muted-till intro-message) |
| 189 | + joined (joined-options id token-permissions muted muted-till color intro-message) |
| 190 | + request-id (join-request-sent-options id token-permissions request-id intro-message) |
| 191 | + banList (banned-options id token-permissions intro-message) |
| 192 | + :else (not-joined-options id token-permissions request-id intro-message)))) |
192 | 193 |
|
193 | 194 | (defn community-options-bottom-sheet
|
194 | 195 | [id]
|
|
0 commit comments