Skip to content

Commit

Permalink
Remove hardcoded StatusBar from legacy components
Browse files Browse the repository at this point in the history
  • Loading branch information
dmnplb committed Feb 7, 2025
1 parent e5e78b9 commit 3f6c115
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
15 changes: 4 additions & 11 deletions ts/RootContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,28 @@ import {
AppState,
AppStateStatus,
EmitterSubscription,
NativeEventSubscription,
StatusBar
NativeEventSubscription
} from "react-native";
import SplashScreen from "react-native-splash-screen";
import { connect } from "react-redux";
import configurePushNotifications from "./features/pushNotifications/utils/configurePushNotification";
import { ReactNavigationInstrumentation } from "./App";
import DebugInfoOverlay from "./components/DebugInfoOverlay";
import PagoPATestIndicatorOverlay from "./components/PagoPATestIndicatorOverlay";
import { LightModalRoot } from "./components/ui/LightModal";
import configurePushNotifications from "./features/pushNotifications/utils/configurePushNotification";
import { setLocale } from "./i18n";
import { IONavigationContainer } from "./navigation/AppStackNavigator";
import RootModal from "./screens/modal/RootModal";
import { applicationChangeState } from "./store/actions/application";
import { setDebugCurrentRouteName } from "./store/actions/debug";
import { navigateBack } from "./store/actions/navigation";
import { setScreenReaderEnabled } from "./store/actions/preferences";
import { isDebugModeEnabledSelector } from "./store/reducers/debug";
import {
isPagoPATestEnabledSelector,
preferredLanguageSelector
} from "./store/reducers/persistedPreferences";
import { GlobalState } from "./store/reducers/types";
import customVariables from "./theme/variables";
import { ReactNavigationInstrumentation } from "./App";
import { setScreenReaderEnabled } from "./store/actions/preferences";

type Props = ReturnType<typeof mapStateToProps> &
typeof mapDispatchToProps & {
Expand Down Expand Up @@ -113,11 +111,6 @@ class RootContainer extends PureComponent<Props> {

return (
<>
<StatusBar
barStyle={"dark-content"}
backgroundColor={customVariables.androidStatusBarColor}
/>

<IONavigationContainer
routingInstrumentation={this.props.routingInstumentation}
/>
Expand Down
7 changes: 1 addition & 6 deletions ts/components/ui/AppHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

import { IOStyles, IOVisualCostants } from "@pagopa/io-app-design-system";
import { PropsWithChildren } from "react";
import { ColorValue, StatusBar, View, ViewProps } from "react-native";
import { ColorValue, View, ViewProps } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import variables from "../../theme/variables";

type Props = ViewProps & {
backgroundColor?: ColorValue;
Expand All @@ -23,10 +22,6 @@ const AppHeader = (props: PropsWithChildren<Props>) => {
backgroundColor: props.backgroundColor
}}
>
<StatusBar
barStyle={"dark-content"}
backgroundColor={variables.androidStatusBarColor}
/>
<View
style={{
...IOStyles.row,
Expand Down
2 changes: 0 additions & 2 deletions ts/theme/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ const customVariables = {
headerBodyFontSize: 14,
headerBodyFontWeight: "600" as FontWeight,

androidStatusBarColor: IOColors.white,

// Text
textColor: IOColors["grey-700"],
textMessageDetailLinkColor: "#0073E6",
Expand Down

0 comments on commit 3f6c115

Please sign in to comment.