[Fix] Profile colour in "Jump to" and "View profile" buttons (#16538)
This commit fixes the profile colour in the following screens: - "View Profile" button on the "Add a contact" page - "Jump to" button inside the chat - "Jump to" button in the "Community Overview" screen Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit is contained in:
parent
728d9d01c5
commit
919fbf2091
|
@ -167,8 +167,9 @@
|
||||||
colors/neutral-40)})
|
colors/neutral-40)})
|
||||||
|
|
||||||
(defn button-view-profile
|
(defn button-view-profile
|
||||||
[state]
|
[state customization-color]
|
||||||
{:type :primary
|
{:type :primary
|
||||||
|
:customization-color customization-color
|
||||||
:size 40
|
:size 40
|
||||||
:width 335
|
:width 335
|
||||||
:style {:margin-top 24
|
:style {:margin-top 24
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
(clipboard/get-string #(reset! clipboard %))
|
(clipboard/get-string #(reset! clipboard %))
|
||||||
(let [{:keys [input scanned public-key ens state msg]}
|
(let [{:keys [input scanned public-key ens state msg]}
|
||||||
(rf/sub [:contacts/new-identity])
|
(rf/sub [:contacts/new-identity])
|
||||||
|
customization-color (rf/sub [:profile/customization-color])
|
||||||
invalid? (= state :invalid)
|
invalid? (= state :invalid)
|
||||||
show-paste-button? (and (not (string/blank? @clipboard))
|
show-paste-button? (and (not (string/blank? @clipboard))
|
||||||
(string/blank? @default-value)
|
(string/blank? @default-value)
|
||||||
|
@ -107,7 +108,7 @@
|
||||||
(when (= state :valid)
|
(when (= state :valid)
|
||||||
[found-contact public-key])]
|
[found-contact public-key])]
|
||||||
[quo/button
|
[quo/button
|
||||||
(merge (style/button-view-profile state)
|
(merge (style/button-view-profile state customization-color)
|
||||||
{:on-press
|
{:on-press
|
||||||
(fn []
|
(fn []
|
||||||
(reset! clipboard nil)
|
(reset! clipboard nil)
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
|
|
||||||
(defn- f-shell-button
|
(defn- f-shell-button
|
||||||
[{:keys [maximized? focused?]} {:keys [height]} {:keys [reply edit]}]
|
[{:keys [maximized? focused?]} {:keys [height]} {:keys [reply edit]}]
|
||||||
(let [insets (safe-area/get-insets)
|
(let [customization-color (rf/sub [:profile/customization-color])
|
||||||
|
insets (safe-area/get-insets)
|
||||||
extra-height (utils/calc-top-content-height reply edit)
|
extra-height (utils/calc-top-content-height reply edit)
|
||||||
neg-y (utils/calc-shell-neg-y insets maximized? extra-height)
|
neg-y (utils/calc-shell-neg-y insets maximized? extra-height)
|
||||||
y-container (reanimated/use-shared-value neg-y)
|
y-container (reanimated/use-shared-value neg-y)
|
||||||
|
@ -49,6 +50,7 @@
|
||||||
{:on-press (fn []
|
{:on-press (fn []
|
||||||
(rf/dispatch [:chat/close true])
|
(rf/dispatch [:chat/close true])
|
||||||
(rf/dispatch [:shell/navigate-to-jump-to]))
|
(rf/dispatch [:shell/navigate-to-jump-to]))
|
||||||
|
:customization-color customization-color
|
||||||
:label (i18n/label :t/jump-to)
|
:label (i18n/label :t/jump-to)
|
||||||
:style {:align-self :center}}} {}]]
|
:style {:align-self :center}}} {}]]
|
||||||
[quo/floating-shell-button
|
[quo/floating-shell-button
|
||||||
|
|
|
@ -356,11 +356,13 @@
|
||||||
|
|
||||||
(defn overview
|
(defn overview
|
||||||
[id]
|
[id]
|
||||||
(let [id (or id (rf/sub [:get-screen-params :community-overview]))]
|
(let [id (or id (rf/sub [:get-screen-params :community-overview]))
|
||||||
|
customization-color (rf/sub [:profile/customization-color])]
|
||||||
[rn/view {:style style/community-overview-container}
|
[rn/view {:style style/community-overview-container}
|
||||||
[community-card-page-view id]
|
[community-card-page-view id]
|
||||||
[floating-shell-button/floating-shell-button
|
[floating-shell-button/floating-shell-button
|
||||||
{:jump-to {:on-press #(rf/dispatch [:shell/navigate-to-jump-to])
|
{:jump-to {:on-press #(rf/dispatch [:shell/navigate-to-jump-to])
|
||||||
|
:customization-color customization-color
|
||||||
:label (i18n/label :t/jump-to)}}
|
:label (i18n/label :t/jump-to)}}
|
||||||
{:position :absolute
|
{:position :absolute
|
||||||
:bottom 41}]]))
|
:bottom 41}]]))
|
||||||
|
|
Loading…
Reference in New Issue