Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use custom color for confirm select #18068

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions src/status_im2/contexts/chat/photo_selector/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@
(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]
:start {:x 0 :y 1}
: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)
Expand Down Expand Up @@ -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])
Expand Down Expand Up @@ -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
Expand Down