diff --git a/src/App.tsx b/src/App.tsx index 91a617b0f..ae76631b0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -9,7 +9,6 @@ import { StatusBar } from 'react-native'; import { RootSiblingParent } from 'react-native-root-siblings'; import { scale } from 'react-native-size-matters'; -import computeStyleSheet from './AppStyles'; import DeepLinkingManager from './deeplinking/DeepLinkingManager'; import I18nManager from './I18n/I18nManager'; import LocationManager from './location/LocationManager'; @@ -172,7 +171,8 @@ function createChargingStationDetailsTabsNavigator(props: BaseProps) { barStyle={barStyle} labeled shifting={true} - backBehavior="history"> + backBehavior="history" + > - - - - + + + + - @@ -301,7 +315,11 @@ function createSitesNavigator(props: BaseProps) { component={createTransactionDetailsTabsNavigator} initialParams={props?.route?.params?.params} /> - + ); } @@ -309,7 +327,11 @@ function createSitesNavigator(props: BaseProps) { function createChargingStationsNavigator(props: BaseProps) { return ( - + - + ); } @@ -407,7 +433,11 @@ function createInvoicesNavigator(props: BaseProps) { function createPaymentMethodsNavigator(props: BaseProps) { return ( - + }> - + - - + + - + ); } @@ -563,7 +577,6 @@ export default class App extends React.Component { public render() { const { showAppUpdateDialog } = this.state; - const commonColors = Utils.getCurrentCommonColor(); return ( this.state.isNavigationStateLoaded && ( diff --git a/src/screens/auth/login/Login.tsx b/src/screens/auth/login/Login.tsx index f8d7ce2e9..f528d5082 100644 --- a/src/screens/auth/login/Login.tsx +++ b/src/screens/auth/login/Login.tsx @@ -1,15 +1,7 @@ import I18n from 'i18n-js'; import { Button, CheckBox, Form, Icon, Item, Spinner, Text, View } from 'native-base'; import React from 'react'; -import { - BackHandler, - Keyboard, - KeyboardAvoidingView, - ScrollView, - TextInput, - TouchableOpacity -} from 'react-native'; - +import { BackHandler, Keyboard, KeyboardAvoidingView, ScrollView, TextInput, TouchableOpacity } from 'react-native'; import DialogModal from '../../../components/modal/DialogModal'; import ExitAppDialog from '../../../components/modal/exit-app/ExitAppDialog'; import computeModalCommonStyle from '../../../components/modal/ModalCommonStyle'; @@ -23,7 +15,6 @@ import Utils from '../../../utils/Utils'; import BaseScreen from '../../base-screen/BaseScreen'; import AuthHeader from '../AuthHeader'; import computeStyleSheet from '../AuthStyles'; -import BaseAutoRefreshScreen from '../../base-screen/BaseAutoRefreshScreen'; export interface Props extends BaseProps {} @@ -48,7 +39,7 @@ interface State { showNoTenantFoundDialog: boolean; } -export default class Login extends BaseAutoRefreshScreen { +export default class Login extends BaseScreen { public state: State; public props: Props; private tenants: TenantConnection[] = []; diff --git a/src/screens/base-screen/BaseScreen.tsx b/src/screens/base-screen/BaseScreen.tsx index 632fbf2a2..e077353ce 100644 --- a/src/screens/base-screen/BaseScreen.tsx +++ b/src/screens/base-screen/BaseScreen.tsx @@ -63,12 +63,6 @@ export default class BaseScreen extends React.Component { } } - public onAppStateChange(nextAppState: AppStateStatus): void { - if(nextAppState === 'active') { - this.componentDidFocus(); - } - } - public getHeaderComponent(): HeaderComponent { return this.headerComponent; } diff --git a/src/screens/charging-stations/list/ChargingStations.tsx b/src/screens/charging-stations/list/ChargingStations.tsx index 7df41bdee..088969458 100644 --- a/src/screens/charging-stations/list/ChargingStations.tsx +++ b/src/screens/charging-stations/list/ChargingStations.tsx @@ -359,6 +359,7 @@ export default class ChargingStations extends BaseAutoRefreshScreen Utils.containsGPSCoordinates(chargingStation.coordinates) ); @@ -409,7 +410,7 @@ export default class ChargingStations extends BaseAutoRefreshScreen this.filterChanged(newFilters)} ref={(chargingStationsFilters: ChargingStationsFilters) => this.setScreenFilters(chargingStationsFilters)} /> - {showMap ? ( + {mapIsDisplayed ? ( {this.currentRegion && (