fix: use custom color for confirm select (#18068)

This commit is contained in:
BalogunofAfrica 2023-12-06 04:10:08 +00:00 committed by GitHub
parent 5ebd133c63
commit 7e14846f0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 7 deletions

View File

@ -35,7 +35,7 @@
(close))
(defn confirm-button
[selected-images sending-image close]
[{:keys [selected-images sending-image close customization-color]}]
(when (not= selected-images sending-image)
[linear-gradient/linear-gradient
{:colors [:black :transparent]
@ -43,7 +43,8 @@
:end {:x 0 :y 0}
:style (style/gradient-container (safe-area/get-bottom))}
[quo/button
{:container-style {:align-self :stretch
{:customization-color customization-color
:container-style {:align-self :stretch
:margin-horizontal 20
:margin-top 12}
:on-press #(on-press-confirm-selection selected-images close)
@ -94,10 +95,11 @@
[{:keys [scroll-enabled on-scroll current-scroll close] :as sheet}]
(rf/dispatch [:photo-selector/get-photos-for-selected-album])
(rf/dispatch [:photo-selector/camera-roll-get-albums])
(let [album? (reagent/atom false)
sending-image (into [] (vals (rf/sub [:chats/sending-image])))
selected-images (reagent/atom sending-image)
window-width (:width (rn/get-window))]
(let [album? (reagent/atom false)
customization-color (rf/sub [:profile/customization-color])
sending-image (into [] (vals (rf/sub [:chats/sending-image])))
selected-images (reagent/atom sending-image)
window-width (:width (rn/get-window))]
[:f>
(fn []
(let [camera-roll-photos (rf/sub [:camera-roll/photos])
@ -140,7 +142,11 @@
(rf/dispatch [:photo-selector/camera-roll-loading-more true])
(rf/dispatch [:photo-selector/get-photos-for-selected-album
end-cursor])))}]
[confirm-button @selected-images sending-image close]]
[confirm-button
{:close close
:customization-color customization-color
:selected-images @selected-images
:sending-image sending-image}]]
[rn/view {:style style/buttons-container}
[quo/dropdown
{:type dropdown-type