Skip to content

Commit

Permalink
chore_: remove welcome screen from onboarding
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-mut committed Jul 29, 2024
1 parent 1f5bb57 commit 0f9862b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 117 deletions.
23 changes: 16 additions & 7 deletions src/status_im/contexts/onboarding/enable_notifications/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[react-native.core :as rn]
[react-native.safe-area :as safe-area]
[status-im.common.resources :as resources]
[status-im.constants :as constants]
[status-im.contexts.onboarding.enable-notifications.style :as style]
[status-im.contexts.shell.jump-to.constants :as shell.constants]
[status-im.contexts.shell.jump-to.utils :as shell.utils]
Expand Down Expand Up @@ -36,9 +37,9 @@
:on-allowed #(log/info "push notification permissions were allowed")
:on-denied #(log/error "user denied push notification permissions")}])
(rf/dispatch [:push-notifications/switch true])
(rf/dispatch [:navigate-to-within-stack
[:screen/onboarding.welcome
:screen/onboarding.enable-notifications]]))
(rf/dispatch [:init-root :shell-stack])
(rf/dispatch [:profile/show-testnet-mode-banner-if-enabled])
(rf/dispatch [:universal-links/process-stored-event]))
:type :primary
:icon-left :i/notifications
:accessibility-label :enable-notifications-button
Expand All @@ -50,15 +51,20 @@
shell.constants/default-selected-stack
true
nil)
(rf/dispatch [:navigate-to-within-stack
[:screen/onboarding.welcome
:screen/onboarding.enable-notifications]]))
(rf/dispatch [:init-root :shell-stack])
(rf/dispatch [:profile/show-testnet-mode-banner-if-enabled])
(rf/dispatch [:universal-links/process-stored-event]))
:accessibility-label :enable-notifications-later-button
:type :grey
:background :blur
:container-style {:margin-top 12}}
(i18n/label :t/maybe-later)]]))

(defn dispatch-visibility-status-update
[status-type]
(rf/dispatch
[:visibility-status-updates/delayed-visibility-status-update status-type]))

(defn enable-notifications-simple
[]
(let [width (:width (rn/get-window))]
Expand All @@ -69,7 +75,10 @@

(defn view
[]
(let [insets (safe-area/get-insets)]
(let [insets (safe-area/get-insets)
{:keys [status-type]} (rf/sub [:multiaccount/current-user-visibility-status])]
(when (nil? status-type)
(dispatch-visibility-status-update constants/visibility-status-automatic))
[rn/view {:style (style/page-container insets)}
[rn/view {:style style/page-heading}
[quo/page-nav {:type :no-title :background :blur}]
Expand Down
36 changes: 0 additions & 36 deletions src/status_im/contexts/onboarding/welcome/style.cljs

This file was deleted.

64 changes: 0 additions & 64 deletions src/status_im/contexts/onboarding/welcome/view.cljs

This file was deleted.

11 changes: 1 addition & 10 deletions src/status_im/navigation/screens.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
[status-im.contexts.onboarding.sign-in.view :as sign-in]
[status-im.contexts.onboarding.syncing.progress.view :as syncing-devices]
[status-im.contexts.onboarding.syncing.results.view :as syncing-results]
[status-im.contexts.onboarding.welcome.view :as welcome]
[status-im.contexts.preview.feature-flags.view :as feature-flags]
[status-im.contexts.preview.quo.component-preview.view :as component-preview]
[status-im.contexts.preview.quo.main :as quo.preview]
Expand Down Expand Up @@ -351,9 +350,7 @@
{:name :screen/onboarding.enable-notifications
:options {:theme :dark
:layout options/onboarding-transparent-layout
:animations (merge
transitions/new-to-status-modal-animations
transitions/push-animations-for-transparent-background)
:animations transitions/push-animations-for-transparent-background
:popGesture false
:modalPresentationStyle :overCurrentContext
:hardwareBackButton {:dismissModalOnPress false
Expand Down Expand Up @@ -404,12 +401,6 @@
:options {:theme :dark}
:component syncing-results/view}

{:name :screen/onboarding.welcome
:options {:theme :dark
:layout options/onboarding-transparent-layout
:animations transitions/push-animations-for-transparent-background}
:component welcome/view}

{:name :emoji-picker
:options {:sheet? true}
:component emoji-picker/view}
Expand Down

0 comments on commit 0f9862b

Please sign in to comment.