Skip to content

Commit

Permalink
fix: onboarding customization colors
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Son89 committed Aug 2, 2023
1 parent c3bf8f2 commit d8d5c41
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/status_im2/common/home/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
[quo/counter
{:accessibility-label :activity-center-unread-count
:type unread-type
:container-style (style/unread-indicator unread-count
:style (style/unread-indicator unread-count
constants/activity-center-max-unread-count)}
unread-count])))

Expand Down
10 changes: 4 additions & 6 deletions src/status_im2/contexts/chat/composer/reply/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,15 @@
(i18n/label :t/photo))
constant/content-type-sticker (i18n/label :t/sticker)
constant/content-type-audio (i18n/label :t/audio)
""))]
])]
""))]])]
(when (and in-chat-input? (not recording-audio?))
[quo/button
{:size 24
{:icon-only? true
:size 24
:accessibility-label :reply-cancel-button
:on-press #(rf/dispatch [:chat.ui/cancel-message-reply])
:type :outline}
[quo/icon :i/close
{:size 16
:color (colors/theme-colors colors/neutral-100 colors/neutral-40)}]])
:i/close])
(when (and in-chat-input? recording-audio?)
[linear-gradient/linear-gradient
{:colors [(colors/theme-colors colors/white-opa-0 colors/neutral-90-opa-0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

(defn enable-notification-buttons
[{:keys [insets]}]
(let [profile-color (:color (rf/sub [:onboarding-2/profile]))]
(let [profile-color (rf/sub [:onboarding-2/customization-color])]
[rn/view {:style (style/buttons insets)}
[quo/button
{:on-press (fn []
Expand Down
2 changes: 1 addition & 1 deletion src/status_im2/contexts/onboarding/welcome/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

(defn view
[]
(let [profile-color (:color (rf/sub [:onboarding-2/profile]))
(let [profile-color (rf/sub [:onboarding-2/customization-color])
{:keys [status-type]} (rf/sub [:multiaccount/current-user-visibility-status])
insets (safe-area/get-insets)]
[rn/view {:style (style/page-container insets)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
[quo/button
{:icon-only? true
:type :grey
:background :blur
:size 32
:accessibility-label :close-activity-center
:on-press #(rf/dispatch [:navigate-back])}
:i/close]
[quo/button
{:icon-only? true
:type :grey
:background :blur
:size 32
:accessibility-label :activity-center-open-more
:on-press #(rf/dispatch [:show-bottom-sheet
Expand Down
12 changes: 12 additions & 0 deletions src/status_im2/subs/onboarding.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(ns status-im2.subs.onboarding
(:require [re-frame.core :as re-frame]))

(re-frame/reg-sub
:onboarding-2/customization-color
:<- [:onboarding-2/profile]
:<- [:profile/customization-color]
:<- [:onboarding-2/new-account?]
(fn [[{:keys [color]} customization-color new-account?]]
(if new-account?
color
customization-color)))
3 changes: 2 additions & 1 deletion src/status_im2/subs/root.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
status-im2.subs.home
status-im2.subs.keycard
status-im2.subs.mailservers
status-im2.subs.profile
status-im2.subs.networks
status-im2.subs.onboarding
status-im2.subs.pairing
status-im2.subs.profile
status-im2.subs.search
status-im2.subs.shell
status-im2.subs.stickers
Expand Down

0 comments on commit d8d5c41

Please sign in to comment.