Only count images in an album in photo selector (#17459)

This commit is contained in:
Ibrahem Khalil 2023-10-03 19:00:51 +03:00 committed by GitHub
parent 5b765f873b
commit f5038f8e24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -33,7 +33,12 @@
[quo/text
{:size :paragraph-2
:style {:color (colors/theme-colors colors/neutral-50 colors/neutral-40)}}
(when size (str size " " (i18n/label :t/images)))]]
(when size
(str size
" "
(if (= size 1)
(i18n/label :t/image)
(i18n/label :t/images))))]]
(when selected?
[rn/view
{:style {:position :absolute

View File

@ -67,7 +67,7 @@
:uri (get-in (first (:edges res-recent)) [:node :image :uri])}])
;; Get albums, then loop over albums and get each one's cover (first photo)
(cameraroll/get-albums
{:assetType "All"}
{:assetType :Photos}
(fn [res-albums]
(let [response-count (count res-albums)]
(if (pos? response-count)