mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-26 00:19:44 +00:00
Fix statusbar color on dark screens (#18785)
This commit is contained in:
parent
1301bbc0d9
commit
7db35a3cc8
@ -133,7 +133,7 @@
|
|||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
</array>
|
</array>
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
<true/>
|
<false/>
|
||||||
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
|
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
|
||||||
<array>
|
<array>
|
||||||
<string>A00000080400010101</string>
|
<string>A00000080400010101</string>
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
:FlatList {}
|
:FlatList {}
|
||||||
:SectionList {}
|
:SectionList {}
|
||||||
:Text {}
|
:Text {}
|
||||||
:StatusBar {}
|
:StatusBar {:setBarStyle identity}
|
||||||
:ScrollView {}
|
:ScrollView {}
|
||||||
:SafeAreaView {}
|
:SafeAreaView {}
|
||||||
:KeyboardAvoidingView {}
|
:KeyboardAvoidingView {}
|
||||||
|
@ -210,3 +210,5 @@
|
|||||||
(def linking (.-Linking react-native))
|
(def linking (.-Linking react-native))
|
||||||
|
|
||||||
(defn open-url [link] (.openURL ^js linking link))
|
(defn open-url [link] (.openURL ^js linking link))
|
||||||
|
|
||||||
|
(def set-status-bar-style react-native/StatusBar.setBarStyle)
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
(ns status-im.navigation.effects
|
(ns status-im.navigation.effects
|
||||||
(:require
|
(:require
|
||||||
|
[quo.theme]
|
||||||
|
[react-native.core :as rn]
|
||||||
[react-native.navigation :as navigation]
|
[react-native.navigation :as navigation]
|
||||||
[status-im.navigation.options :as options]
|
[status-im.navigation.options :as options]
|
||||||
[status-im.navigation.roots :as roots]
|
[status-im.navigation.roots :as roots]
|
||||||
@ -8,10 +10,20 @@
|
|||||||
[taoensso.timbre :as log]
|
[taoensso.timbre :as log]
|
||||||
[utils.re-frame :as rf]))
|
[utils.re-frame :as rf]))
|
||||||
|
|
||||||
|
(defn- set-status-bar-color
|
||||||
|
[theme]
|
||||||
|
(rn/set-status-bar-style
|
||||||
|
(if (= theme :dark)
|
||||||
|
"light-content"
|
||||||
|
"dark-content")
|
||||||
|
true))
|
||||||
|
|
||||||
(rf/reg-fx :set-view-id-fx
|
(rf/reg-fx :set-view-id-fx
|
||||||
(fn [view-id]
|
(fn [view-id]
|
||||||
(rf/dispatch [:screens/on-will-focus view-id])
|
(rf/dispatch [:screens/on-will-focus view-id])
|
||||||
(when-let [{:keys [on-focus]} (get views/screens view-id)]
|
(when-let [{:keys [on-focus options]} (get views/screens view-id)]
|
||||||
|
(set-status-bar-color (or (:theme options)
|
||||||
|
(quo.theme/get-theme)))
|
||||||
(when on-focus
|
(when on-focus
|
||||||
(rf/dispatch on-focus)))))
|
(rf/dispatch on-focus)))))
|
||||||
|
|
||||||
@ -117,11 +129,12 @@
|
|||||||
|
|
||||||
(defn open-modal
|
(defn open-modal
|
||||||
[component]
|
[component]
|
||||||
(let [{:keys [options]} (get views/screens component)
|
(let [{:keys [options name]} (get views/screens component)
|
||||||
sheet? (:sheet? options)]
|
sheet? (:sheet? options)]
|
||||||
(if @state/dissmissing
|
(if @state/dissmissing
|
||||||
(reset! state/dissmissing component)
|
(reset! state/dissmissing component)
|
||||||
(do
|
(do
|
||||||
|
(set-view-id name) ; TODO https://github.com/status-im/status-mobile/issues/18811
|
||||||
(reset! state/curr-modal true)
|
(reset! state/curr-modal true)
|
||||||
(swap! state/modals conj component)
|
(swap! state/modals conj component)
|
||||||
(navigation/show-modal
|
(navigation/show-modal
|
||||||
|
@ -137,9 +137,6 @@
|
|||||||
:decelerate
|
:decelerate
|
||||||
:factor 1.5}}]}}})
|
:factor 1.5}}]}}})
|
||||||
|
|
||||||
(def camera-screen
|
|
||||||
{:navigationBar {:backgroundColor colors/black}})
|
|
||||||
|
|
||||||
(defn merge-top-bar
|
(defn merge-top-bar
|
||||||
[root-options options]
|
[root-options options]
|
||||||
(let [options (:topBar options)]
|
(let [options (:topBar options)]
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
(ns status-im.navigation.screens
|
(ns status-im.navigation.screens
|
||||||
(:require
|
(:require
|
||||||
[legacy.status-im.ui.screens.screens :as old-screens]
|
[legacy.status-im.ui.screens.screens :as old-screens]
|
||||||
|
[quo.foundations.colors :as colors]
|
||||||
[status-im.common.emoji-picker.view :as emoji-picker]
|
[status-im.common.emoji-picker.view :as emoji-picker]
|
||||||
[status-im.common.lightbox.view :as lightbox]
|
[status-im.common.lightbox.view :as lightbox]
|
||||||
[status-im.config :as config]
|
[status-im.config :as config]
|
||||||
@ -142,7 +143,8 @@
|
|||||||
:component photo-selector/photo-selector}
|
:component photo-selector/photo-selector}
|
||||||
|
|
||||||
{:name :camera-screen
|
{:name :camera-screen
|
||||||
:options options/camera-screen
|
:options {:navigationBar {:backgroundColor colors/black}
|
||||||
|
:theme :dark}
|
||||||
:component camera-screen/camera-screen}
|
:component camera-screen/camera-screen}
|
||||||
|
|
||||||
{:name :new-contact
|
{:name :new-contact
|
||||||
@ -433,6 +435,13 @@
|
|||||||
:options options/transparent-modal-screen-options
|
:options options/transparent-modal-screen-options
|
||||||
:component settings-password/view}]
|
:component settings-password/view}]
|
||||||
|
|
||||||
|
[{:name :shell
|
||||||
|
:options {:theme :dark}}
|
||||||
|
{:name :communities-stack}
|
||||||
|
{:name :chats-stack}
|
||||||
|
{:name :wallet-stack}
|
||||||
|
{:name :browser-stack}]
|
||||||
|
|
||||||
(when js/goog.DEBUG
|
(when js/goog.DEBUG
|
||||||
[{:name :dev-component-preview
|
[{:name :dev-component-preview
|
||||||
:options {:sheet? true}
|
:options {:sheet? true}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user