From 9fab422e0c9fa7c72bdc2dff8973785b768721ca Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Fri, 23 Feb 2024 15:09:11 +0530 Subject: [PATCH] fix settings navigation (#18854) --- .../contexts/profile/settings/list_items.cljs | 14 +++++++------- .../syncing/syncing_devices_list/style.cljs | 4 +++- .../syncing/syncing_devices_list/view.cljs | 4 +++- src/status_im/navigation/screens.cljs | 4 ++-- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/status_im/contexts/profile/settings/list_items.cljs b/src/status_im/contexts/profile/settings/list_items.cljs index 8a17d6c866..acc190ab0a 100644 --- a/src/status_im/contexts/profile/settings/list_items.cljs +++ b/src/status_im/contexts/profile/settings/list_items.cljs @@ -48,19 +48,19 @@ :blur? true :action :arrow}] [{:title (i18n/label :t/syncing) - :on-press #(rf/dispatch [:navigate-to :settings-syncing]) + :on-press #(rf/dispatch [:open-modal :settings-syncing]) :image-props :i/syncing :image :icon :blur? true :action :arrow} {:title (i18n/label :t/notifications) - :on-press #(rf/dispatch [:navigate-to :notifications]) + :on-press #(rf/dispatch [:open-modal :notifications]) :image-props :i/activity-center :image :icon :blur? true :action :arrow} {:title (i18n/label :t/appearance) - :on-press #(rf/dispatch [:navigate-to :appearance]) + :on-press #(rf/dispatch [:open-modal :appearance]) :image-props :i/light :image :icon :blur? true @@ -78,28 +78,28 @@ :blur? true :action :arrow} {:title (i18n/label :t/advanced) - :on-press #(rf/dispatch [:navigate-to :advanced-settings]) + :on-press #(rf/dispatch [:open-modal :advanced-settings]) :image-props :i/settings :image :icon :blur? true :action :arrow}] ;; temporary link to legacy settings [{:title "Legacy settings" - :on-press #(rf/dispatch [:navigate-to :my-profile]) + :on-press #(rf/dispatch [:open-modal :my-profile]) :action :arrow :image :icon :blur? true :image-props :i/toggle} (when config/quo-preview-enabled? {:title "Quo preview" - :on-press #(rf/dispatch [:navigate-to :quo-preview]) + :on-press #(rf/dispatch [:open-modal :quo-preview]) :action :arrow :image :icon :blur? true :image-props :i/light}) (when config/quo-preview-enabled? {:title "Feature Flags" - :on-press #(rf/dispatch [:navigate-to :feature-flags]) + :on-press #(rf/dispatch [:open-modal :feature-flags]) :action :arrow :image :icon :blur? true diff --git a/src/status_im/contexts/syncing/syncing_devices_list/style.cljs b/src/status_im/contexts/syncing/syncing_devices_list/style.cljs index 6b4b6f8513..0b972c5675 100644 --- a/src/status_im/contexts/syncing/syncing_devices_list/style.cljs +++ b/src/status_im/contexts/syncing/syncing_devices_list/style.cljs @@ -2,8 +2,10 @@ (:require [quo.foundations.colors :as colors])) -(def container-main +(defn container-main + [top] {:background-color colors/neutral-95 + :padding-top top :flex 1}) (def page-container diff --git a/src/status_im/contexts/syncing/syncing_devices_list/view.cljs b/src/status_im/contexts/syncing/syncing_devices_list/view.cljs index 0087cd36cc..a30aec6d29 100644 --- a/src/status_im/contexts/syncing/syncing_devices_list/view.cljs +++ b/src/status_im/contexts/syncing/syncing_devices_list/view.cljs @@ -3,6 +3,7 @@ [quo.core :as quo] [quo.foundations.colors :as colors] [react-native.core :as rn] + [react-native.safe-area :as safe-area] [status-im.contexts.syncing.device.view :as device] [status-im.contexts.syncing.syncing-devices-list.style :as style] [utils.i18n :as i18n] @@ -11,6 +12,7 @@ (defn view [] (let [devices (rf/sub [:pairing/installations]) + insets (safe-area/get-insets) devices-with-button (map #(assoc % :show-button? true) devices) user-device (first devices-with-button) other-devices (rest devices-with-button) @@ -18,7 +20,7 @@ {:keys [paired-devices unpaired-devices]} (group-by #(if (:enabled? %) :paired-devices :unpaired-devices) other-devices)] - [rn/view {:style style/container-main} + [rn/view {:style (style/container-main (:top insets))} [quo/page-nav {:type :no-title :background :blur diff --git a/src/status_im/navigation/screens.cljs b/src/status_im/navigation/screens.cljs index eda7697b44..3951833d9f 100644 --- a/src/status_im/navigation/screens.cljs +++ b/src/status_im/navigation/screens.cljs @@ -167,7 +167,7 @@ :component settings/view} {:name :settings-syncing - :options (merge options/dark-screen {:insets {:top? true}}) + :options options/transparent-modal-screen-options :component settings-syncing/view} {:name :settings-setup-syncing @@ -425,7 +425,7 @@ ;; Settings {:name :settings-password - :options options/transparent-screen-options + :options options/transparent-modal-screen-options :component settings-password/view}] (when js/goog.DEBUG