mirror of
https://github.com/status-im/status-react.git
synced 2025-02-23 08:08:33 +00:00
Only count images in an album in photo selector (#17459)
This commit is contained in:
parent
5b765f873b
commit
f5038f8e24
@ -33,7 +33,12 @@
|
|||||||
[quo/text
|
[quo/text
|
||||||
{:size :paragraph-2
|
{:size :paragraph-2
|
||||||
:style {:color (colors/theme-colors colors/neutral-50 colors/neutral-40)}}
|
: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?
|
(when selected?
|
||||||
[rn/view
|
[rn/view
|
||||||
{:style {:position :absolute
|
{:style {:position :absolute
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
:uri (get-in (first (:edges res-recent)) [:node :image :uri])}])
|
:uri (get-in (first (:edges res-recent)) [:node :image :uri])}])
|
||||||
;; Get albums, then loop over albums and get each one's cover (first photo)
|
;; Get albums, then loop over albums and get each one's cover (first photo)
|
||||||
(cameraroll/get-albums
|
(cameraroll/get-albums
|
||||||
{:assetType "All"}
|
{:assetType :Photos}
|
||||||
(fn [res-albums]
|
(fn [res-albums]
|
||||||
(let [response-count (count res-albums)]
|
(let [response-count (count res-albums)]
|
||||||
(if (pos? response-count)
|
(if (pos? response-count)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user