fix continue button partially hidden on the Change password screen (#20409)

This commit is contained in:
Parvesh Monu 2024-06-12 18:29:28 +05:30 committed by GitHub
parent af07205f20
commit 8f75761ae9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 14 additions and 9 deletions

View File

@ -10,7 +10,7 @@
(reagent/as-element (reagent/as-element
(into [react/keyboard-avoiding-view (into [react/keyboard-avoiding-view
(update props (update props
:keyboardVerticalOffset :keyboard-vertical-offset
+ +
20 20
(if (:ignore-offset props) 44 0))] (if (:ignore-offset props) 44 0))]

View File

@ -275,7 +275,7 @@
(merge (when platform/ios? {:behavior :padding}) (merge (when platform/ios? {:behavior :padding})
(if (:ignore-offset props) (if (:ignore-offset props)
props props
(update props :keyboardVerticalOffset + 44 (:status-bar-height @navigation-const))))] (update props :keyboard-vertical-offset + 44 (:status-bar-height @navigation-const))))]
children)) children))
(defn keyboard-avoiding-view-new (defn keyboard-avoiding-view-new
@ -284,7 +284,7 @@
(merge (when platform/ios? {:behavior :padding}) (merge (when platform/ios? {:behavior :padding})
(if (:ignore-offset props) (if (:ignore-offset props)
props props
(update props :keyboardVerticalOffset + 44)))] (update props :keyboard-vertical-offset + 44)))]
children)) children))
(defn scroll-view (defn scroll-view

View File

@ -195,8 +195,8 @@
profile-picture (rf/sub [:profile/login-profiles-picture key-uid]) profile-picture (rf/sub [:profile/login-profiles-picture key-uid])
login-multiaccount (rn/use-callback #(rf/dispatch [:profile.login/login]))] login-multiaccount (rn/use-callback #(rf/dispatch [:profile.login/login]))]
[rn/keyboard-avoiding-view [rn/keyboard-avoiding-view
{:style style/login-container {:style style/login-container
:keyboardVerticalOffset (- (safe-area/get-bottom))} :keyboard-vertical-offset (- (safe-area/get-bottom))}
[rn/view {:style style/multi-profile-button-container} [rn/view {:style style/multi-profile-button-container}
(when config/quo-preview-enabled? (when config/quo-preview-enabled?
[quo/button [quo/button

View File

@ -1,6 +1,7 @@
(ns status-im.contexts.profile.settings.screens.password.change-password.style (ns status-im.contexts.profile.settings.screens.password.change-password.style
(:require (:require
[quo.foundations.colors :as colors] [quo.foundations.colors :as colors]
[react-native.platform :as platform]
[react-native.safe-area :as safe-area])) [react-native.safe-area :as safe-area]))
(def form-container (def form-container
@ -48,7 +49,7 @@
:justify-content :space-between}) :justify-content :space-between})
(def bottom-part (def bottom-part
{:margin-bottom (- (safe-area/get-bottom) 12) {:margin-bottom (if platform/ios? (safe-area/get-bottom) 12)
:justify-content :flex-end}) :justify-content :flex-end})
(def disclaimer-container (def disclaimer-container

View File

@ -17,7 +17,7 @@
(defn view (defn view
[] []
(let [{:keys [top]} (safe-area/get-insets) (let [{:keys [top bottom]} (safe-area/get-insets)
alert-banners-top-margin (rf/sub [:alert-banners/top-margin]) alert-banners-top-margin (rf/sub [:alert-banners/top-margin])
current-step (rf/sub [:settings/change-password-current-step])] current-step (rf/sub [:settings/change-password-current-step])]
(rn/use-unmount #(rf/dispatch [:change-password/reset])) (rn/use-unmount #(rf/dispatch [:change-password/reset]))
@ -33,8 +33,12 @@
:icon-name :i/arrow-left :icon-name :i/arrow-left
:on-press navigate-back}] :on-press navigate-back}]
[rn/keyboard-avoiding-view [rn/keyboard-avoiding-view
{:style {:flex 1} {:style {:flex 1}
:keyboardVerticalOffset (if platform/ios? alert-banners-top-margin 0)} :keyboard-vertical-offset (if platform/ios?
(-> 12
(+ alert-banners-top-margin)
(- bottom))
0)}
(condp = current-step (condp = current-step
:old-password [old-password-form/view] :old-password [old-password-form/view]
:new-password [new-password-form/view])]]])) :new-password [new-password-form/view])]]]))