Skip to content

Commit

Permalink
fix settings navigation (#18854)
Browse files Browse the repository at this point in the history
  • Loading branch information
Parveshdhull committed Feb 23, 2024
1 parent 6f8aa15 commit 9fab422
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
14 changes: 7 additions & 7 deletions src/status_im/contexts/profile/settings/list_items.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -11,14 +12,15 @@
(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)
profile-color (rf/sub [:profile/customization-color])
{: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
Expand Down
4 changes: 2 additions & 2 deletions src/status_im/navigation/screens.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9fab422

Please sign in to comment.