From f5038f8e24a41e74289bdd3072117664781810cf Mon Sep 17 00:00:00 2001 From: Ibrahem Khalil Date: Tue, 3 Oct 2023 19:00:51 +0300 Subject: [PATCH] Only count images in an album in photo selector (#17459) --- .../contexts/chat/photo_selector/album_selector/view.cljs | 7 ++++++- src/status_im2/contexts/chat/photo_selector/events.cljs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/status_im2/contexts/chat/photo_selector/album_selector/view.cljs b/src/status_im2/contexts/chat/photo_selector/album_selector/view.cljs index 6494ada7e96..2ca2858a98a 100644 --- a/src/status_im2/contexts/chat/photo_selector/album_selector/view.cljs +++ b/src/status_im2/contexts/chat/photo_selector/album_selector/view.cljs @@ -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 diff --git a/src/status_im2/contexts/chat/photo_selector/events.cljs b/src/status_im2/contexts/chat/photo_selector/events.cljs index 3f7e2cd5267..2b5b6a15ec0 100644 --- a/src/status_im2/contexts/chat/photo_selector/events.cljs +++ b/src/status_im2/contexts/chat/photo_selector/events.cljs @@ -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)