mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-15 19:24:36 +00:00
fix status-bar font color (#15596)
This commit is contained in:
parent
45b501816a
commit
512af400d7
@ -365,9 +365,25 @@
|
|||||||
[_]
|
[_]
|
||||||
(status/get-node-config #(re-frame/dispatch [::get-node-config-callback %])))
|
(status/get-node-config #(re-frame/dispatch [::get-node-config-callback %])))
|
||||||
|
|
||||||
|
(rf/defn redirect-to-root
|
||||||
|
"Decides which root should be initialised depending on user and app state"
|
||||||
|
[{:keys [db] :as cofx}]
|
||||||
|
(cond
|
||||||
|
(get db :onboarding-2/new-account?)
|
||||||
|
{:dispatch [:onboarding-2/finalize-setup]}
|
||||||
|
|
||||||
|
(get db :tos/accepted?)
|
||||||
|
(rf/merge
|
||||||
|
cofx
|
||||||
|
(multiaccounts/switch-theme nil :shell-stack)
|
||||||
|
(navigation/init-root :shell-stack))
|
||||||
|
|
||||||
|
:else
|
||||||
|
{:dispatch [:init-root :tos]}))
|
||||||
|
|
||||||
(rf/defn get-settings-callback
|
(rf/defn get-settings-callback
|
||||||
{:events [::get-settings-callback]}
|
{:events [::get-settings-callback]}
|
||||||
[{:keys [db] :as cofx} settings]
|
[{:keys [db] :as cofx} settings pairing-in-progress?]
|
||||||
(let [{:networks/keys [current-network networks]
|
(let [{:networks/keys [current-network networks]
|
||||||
:as settings}
|
:as settings}
|
||||||
(data-store.settings/rpc->settings settings)
|
(data-store.settings/rpc->settings settings)
|
||||||
@ -397,7 +413,9 @@
|
|||||||
(logging/set-log-level (:log-level multiaccount))
|
(logging/set-log-level (:log-level multiaccount))
|
||||||
(activity-center/notifications-fetch-pending-contact-requests)
|
(activity-center/notifications-fetch-pending-contact-requests)
|
||||||
(activity-center/update-seen-state)
|
(activity-center/update-seen-state)
|
||||||
(activity-center/notifications-fetch-unread-count))))
|
(activity-center/notifications-fetch-unread-count)
|
||||||
|
(when-not pairing-in-progress?
|
||||||
|
(redirect-to-root)))))
|
||||||
|
|
||||||
(re-frame/reg-fx
|
(re-frame/reg-fx
|
||||||
::open-last-chat
|
::open-last-chat
|
||||||
@ -472,19 +490,6 @@
|
|||||||
keychain/auth-method-biometric
|
keychain/auth-method-biometric
|
||||||
keychain/auth-method-password))))
|
keychain/auth-method-password))))
|
||||||
|
|
||||||
(defn redirect-to-root
|
|
||||||
"Decides which root should be initialised depending on user and app state"
|
|
||||||
[db]
|
|
||||||
(cond
|
|
||||||
(get db :onboarding-2/new-account?)
|
|
||||||
(re-frame/dispatch [:onboarding-2/finalize-setup])
|
|
||||||
|
|
||||||
(get db :tos/accepted?)
|
|
||||||
(re-frame/dispatch [:init-root :shell-stack])
|
|
||||||
|
|
||||||
:else
|
|
||||||
(re-frame/dispatch [:init-root :tos])))
|
|
||||||
|
|
||||||
(rf/defn login-only-events
|
(rf/defn login-only-events
|
||||||
[{:keys [db] :as cofx} key-uid password save-password?]
|
[{:keys [db] :as cofx} key-uid password save-password?]
|
||||||
(let [auth-method (:auth-method db)
|
(let [auth-method (:auth-method db)
|
||||||
@ -497,9 +502,7 @@
|
|||||||
{:db (assoc db :chats/loading? true)
|
{:db (assoc db :chats/loading? true)
|
||||||
:json-rpc/call
|
:json-rpc/call
|
||||||
[{:method "settings_getSettings"
|
[{:method "settings_getSettings"
|
||||||
:on-success #(do (re-frame/dispatch [::get-settings-callback %])
|
:on-success #(re-frame/dispatch [::get-settings-callback % pairing-in-progress?])}]}
|
||||||
(when-not pairing-in-progress?
|
|
||||||
(redirect-to-root db)))}]}
|
|
||||||
(notifications/load-notification-preferences)
|
(notifications/load-notification-preferences)
|
||||||
(when save-password?
|
(when save-password?
|
||||||
(keychain/save-user-password key-uid password))
|
(keychain/save-user-password key-uid password))
|
||||||
|
@ -7,19 +7,23 @@
|
|||||||
{:layout {:orientation :portrait}
|
{:layout {:orientation :portrait}
|
||||||
:topBar {:visible false}})
|
:topBar {:visible false}})
|
||||||
|
|
||||||
|
;; Note: Currently, the status bar style provided while setting the root has a high preference,
|
||||||
|
;; and even if we change the status bar style later dynamically, the style gets restored to this
|
||||||
|
;; set root style while navigating
|
||||||
|
;; https://github.com/status-im/status-mobile/pull/15596
|
||||||
(defn statusbar-and-navbar-root
|
(defn statusbar-and-navbar-root
|
||||||
[]
|
[& [status-bar-theme]]
|
||||||
(if platform/android?
|
(if platform/android?
|
||||||
{:navigationBar {:backgroundColor colors/neutral-100}
|
{:navigationBar {:backgroundColor colors/neutral-100}
|
||||||
:statusBar {:translucent true
|
:statusBar {:translucent true
|
||||||
:backgroundColor :transparent
|
:backgroundColor :transparent
|
||||||
:style :light
|
:style (or status-bar-theme :light)
|
||||||
:drawBehind true}}
|
:drawBehind true}}
|
||||||
{:statusBar {:style :light}}))
|
{:statusBar {:style (or status-bar-theme :light)}}))
|
||||||
|
|
||||||
(defn default-root
|
(defn default-root
|
||||||
[]
|
[& [status-bar-theme]]
|
||||||
(merge (statusbar-and-navbar-root)
|
(merge (statusbar-and-navbar-root status-bar-theme)
|
||||||
{:topBar {:visible false}
|
{:topBar {:visible false}
|
||||||
:layout {:componentBackgroundColor (colors/theme-colors colors/white colors/neutral-100)
|
:layout {:componentBackgroundColor (colors/theme-colors colors/white colors/neutral-100)
|
||||||
:orientation :portrait
|
:orientation :portrait
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
(ns status-im2.navigation.roots
|
(ns status-im2.navigation.roots
|
||||||
(:require [status-im2.navigation.view :as views]
|
(:require [status-im2.navigation.view :as views]
|
||||||
|
[quo2.foundations.colors :as colors]
|
||||||
[status-im2.navigation.options :as options]
|
[status-im2.navigation.options :as options]
|
||||||
[status-im2.constants :as constants]))
|
[status-im2.constants :as constants]))
|
||||||
|
|
||||||
@ -101,7 +102,8 @@
|
|||||||
{:stack {:id :shell-stack
|
{:stack {:id :shell-stack
|
||||||
:children [{:component {:name :shell-stack
|
:children [{:component {:name :shell-stack
|
||||||
:id :shell-stack
|
:id :shell-stack
|
||||||
:options (options/default-root)}}]}}}
|
:options (options/default-root
|
||||||
|
(if (colors/dark?) :light :dark))}}]}}}
|
||||||
:profiles
|
:profiles
|
||||||
{:root
|
{:root
|
||||||
{:stack {:id :profiles
|
{:stack {:id :profiles
|
||||||
|
Loading…
x
Reference in New Issue
Block a user