|
182 | 182 |
|
183 | 183 | (defn open-photo-selector
|
184 | 184 | [{:keys [input-ref]}
|
185 |
| - {:keys [height]} |
186 |
| - insets] |
| 185 | + {:keys [height]}] |
187 | 186 | (permissions/request-permissions
|
188 | 187 | {:permissions [(if platform/is-below-android-13? :read-external-storage :read-media-images)
|
189 | 188 | :write-external-storage]
|
|
192 | 191 | (.blur ^js @input-ref))
|
193 | 192 | (rf/dispatch [:chat.ui/set-input-content-height
|
194 | 193 | (reanimated/get-shared-value height)])
|
195 |
| - (rf/dispatch [:open-modal :photo-selector {:insets insets}])) |
| 194 | + (rf/dispatch [:photo-selector/navigate-to-photo-selector])) |
196 | 195 | :on-denied (fn []
|
197 | 196 | (alert.effects/show-popup (i18n/label :t/error)
|
198 | 197 | (i18n/label
|
199 | 198 | :t/external-storage-denied)))}))
|
200 | 199 |
|
201 | 200 | (defn image-button
|
202 |
| - [props animations insets edit] |
| 201 | + [props animations edit] |
203 | 202 | [quo/composer-button
|
204 | 203 | {:on-press (if edit
|
205 | 204 | #(js/alert "This feature is temporarily unavailable in edit mode.")
|
206 |
| - #(open-photo-selector props animations insets)) |
| 205 | + #(open-photo-selector props animations)) |
207 | 206 | :accessibility-label :open-images-button
|
208 | 207 | :container-style {:margin-right 12}
|
209 | 208 | :icon :i/image}])
|
|
228 | 227 | :icon :i/format}])
|
229 | 228 |
|
230 | 229 | (defn view
|
231 |
| - [props state animations window-height insets {:keys [edit images]}] |
| 230 | + [props state animations window-height {:keys [edit images]}] |
232 | 231 | (let [send-btn-opacity (reanimated/use-shared-value 0)
|
233 | 232 | audio-btn-opacity (reanimated/interpolate send-btn-opacity [0 1] [1 0])]
|
234 | 233 | [rn/view {:style style/actions-container}
|
235 | 234 | [rn/view
|
236 | 235 | {:style {:flex-direction :row
|
237 | 236 | :display (if @(:recording? state) :none :flex)}}
|
238 | 237 | [camera-button edit]
|
239 |
| - [image-button props animations insets edit] |
| 238 | + [image-button props animations edit] |
240 | 239 | [reaction-button]
|
241 | 240 | [format-button]]
|
242 | 241 | [:f> send-button props state animations window-height images edit send-btn-opacity]
|
|
0 commit comments