test Crash when trying to attach image to message #20510
This commit is contained in:
parent
6931fd0052
commit
4c8b7069de
|
@ -24,7 +24,7 @@
|
|||
:assetType "Photos"
|
||||
:groupTypes (if (= album (i18n/label :t/recent)) "All" "Albums")
|
||||
:groupName (if (not= album (i18n/label :t/recent)) album "")
|
||||
:include ["imageSize"]}
|
||||
:include ["imageSize" "fileExtension"]}
|
||||
(when end-cursor
|
||||
{:after end-cursor}))
|
||||
#(rf/dispatch [:on-camera-roll-get-photos (:edges %) (:page_info %) end-cursor])))})))
|
||||
|
|
|
@ -71,26 +71,27 @@
|
|||
(let [theme (quo.theme/use-theme)
|
||||
customization-color (rf/sub [:profile/customization-color])
|
||||
item-selected? (some #(= (:uri item) (:uri %)) @selected)]
|
||||
[rn/touchable-opacity
|
||||
{:on-press (fn []
|
||||
(if item-selected?
|
||||
(swap! selected remove-selected item)
|
||||
(if (>= (count @selected) constants/max-album-photos)
|
||||
(show-photo-limit-toast)
|
||||
(swap! selected conj item))))
|
||||
:allow-multiple-presses? true
|
||||
:accessibility-label (str "image-" index)}
|
||||
[rn/image
|
||||
{:source {:uri (:uri item)}
|
||||
:style (style/image window-width index)}]
|
||||
(when item-selected?
|
||||
[:<>
|
||||
[rn/view {:style (style/overlay window-width theme)}]
|
||||
[quo/counter
|
||||
{:container-style style/image-count
|
||||
:customization-color customization-color
|
||||
:accessibility-label (str "count-" index)}
|
||||
(inc (utils.collection/first-index #(= (:uri item) (:uri %)) @selected))]])]))
|
||||
[rn/text {:style {:border-width 1 :border-color :red :padding 5}} (str index " ") (:extension item)]
|
||||
#_[rn/touchable-opacity
|
||||
{:on-press (fn []
|
||||
(if item-selected?
|
||||
(swap! selected remove-selected item)
|
||||
(if (>= (count @selected) constants/max-album-photos)
|
||||
(show-photo-limit-toast)
|
||||
(swap! selected conj item))))
|
||||
:allow-multiple-presses? true
|
||||
:accessibility-label (str "image-" index)}
|
||||
[rn/image
|
||||
{:source {:uri (:uri item)}
|
||||
:style (style/image window-width index)}]
|
||||
(when item-selected?
|
||||
[:<>
|
||||
[rn/view {:style (style/overlay window-width theme)}]
|
||||
[quo/counter
|
||||
{:container-style style/image-count
|
||||
:customization-color customization-color
|
||||
:accessibility-label (str "count-" index)}
|
||||
(inc (utils.collection/first-index #(= (:uri item) (:uri %)) @selected))]])]))
|
||||
|
||||
(defn photo-selector
|
||||
[{:keys [scroll-enabled? on-scroll current-scroll close] :as sheet}]
|
||||
|
|
Loading…
Reference in New Issue