From 8f75761ae9480c6e7673c1a95f2acf77cc92f856 Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Wed, 12 Jun 2024 18:29:28 +0530 Subject: [PATCH] fix continue button partially hidden on the Change password screen (#20409) --- .../ui/components/keyboard_avoid_presentation.cljs | 2 +- src/legacy/status_im/ui/components/react.cljs | 4 ++-- src/status_im/contexts/profile/profiles/view.cljs | 4 ++-- .../screens/password/change_password/style.cljs | 3 ++- .../screens/password/change_password/view.cljs | 10 +++++++--- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/legacy/status_im/ui/components/keyboard_avoid_presentation.cljs b/src/legacy/status_im/ui/components/keyboard_avoid_presentation.cljs index 2f68be6d04..e3e4a8bb8e 100644 --- a/src/legacy/status_im/ui/components/keyboard_avoid_presentation.cljs +++ b/src/legacy/status_im/ui/components/keyboard_avoid_presentation.cljs @@ -10,7 +10,7 @@ (reagent/as-element (into [react/keyboard-avoiding-view (update props - :keyboardVerticalOffset + :keyboard-vertical-offset + 20 (if (:ignore-offset props) 44 0))] diff --git a/src/legacy/status_im/ui/components/react.cljs b/src/legacy/status_im/ui/components/react.cljs index 43f9dc7bbe..ce9abf362c 100644 --- a/src/legacy/status_im/ui/components/react.cljs +++ b/src/legacy/status_im/ui/components/react.cljs @@ -275,7 +275,7 @@ (merge (when platform/ios? {:behavior :padding}) (if (:ignore-offset props) props - (update props :keyboardVerticalOffset + 44 (:status-bar-height @navigation-const))))] + (update props :keyboard-vertical-offset + 44 (:status-bar-height @navigation-const))))] children)) (defn keyboard-avoiding-view-new @@ -284,7 +284,7 @@ (merge (when platform/ios? {:behavior :padding}) (if (:ignore-offset props) props - (update props :keyboardVerticalOffset + 44)))] + (update props :keyboard-vertical-offset + 44)))] children)) (defn scroll-view diff --git a/src/status_im/contexts/profile/profiles/view.cljs b/src/status_im/contexts/profile/profiles/view.cljs index eeb3a43da3..73371204d1 100644 --- a/src/status_im/contexts/profile/profiles/view.cljs +++ b/src/status_im/contexts/profile/profiles/view.cljs @@ -195,8 +195,8 @@ profile-picture (rf/sub [:profile/login-profiles-picture key-uid]) login-multiaccount (rn/use-callback #(rf/dispatch [:profile.login/login]))] [rn/keyboard-avoiding-view - {:style style/login-container - :keyboardVerticalOffset (- (safe-area/get-bottom))} + {:style style/login-container + :keyboard-vertical-offset (- (safe-area/get-bottom))} [rn/view {:style style/multi-profile-button-container} (when config/quo-preview-enabled? [quo/button diff --git a/src/status_im/contexts/profile/settings/screens/password/change_password/style.cljs b/src/status_im/contexts/profile/settings/screens/password/change_password/style.cljs index 86d62f95ba..ceee6c82b5 100644 --- a/src/status_im/contexts/profile/settings/screens/password/change_password/style.cljs +++ b/src/status_im/contexts/profile/settings/screens/password/change_password/style.cljs @@ -1,6 +1,7 @@ (ns status-im.contexts.profile.settings.screens.password.change-password.style (:require [quo.foundations.colors :as colors] + [react-native.platform :as platform] [react-native.safe-area :as safe-area])) (def form-container @@ -48,7 +49,7 @@ :justify-content :space-between}) (def bottom-part - {:margin-bottom (- (safe-area/get-bottom) 12) + {:margin-bottom (if platform/ios? (safe-area/get-bottom) 12) :justify-content :flex-end}) (def disclaimer-container diff --git a/src/status_im/contexts/profile/settings/screens/password/change_password/view.cljs b/src/status_im/contexts/profile/settings/screens/password/change_password/view.cljs index 910efb64b7..0c050a8a6d 100644 --- a/src/status_im/contexts/profile/settings/screens/password/change_password/view.cljs +++ b/src/status_im/contexts/profile/settings/screens/password/change_password/view.cljs @@ -17,7 +17,7 @@ (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]) current-step (rf/sub [:settings/change-password-current-step])] (rn/use-unmount #(rf/dispatch [:change-password/reset])) @@ -33,8 +33,12 @@ :icon-name :i/arrow-left :on-press navigate-back}] [rn/keyboard-avoiding-view - {:style {:flex 1} - :keyboardVerticalOffset (if platform/ios? alert-banners-top-margin 0)} + {:style {:flex 1} + :keyboard-vertical-offset (if platform/ios? + (-> 12 + (+ alert-banners-top-margin) + (- bottom)) + 0)} (condp = current-step :old-password [old-password-form/view] :new-password [new-password-form/view])]]]))