diff --git a/src/screens/charging-stations/list/ChargingStations.tsx b/src/screens/charging-stations/list/ChargingStations.tsx index bd0120da4..b80f8d90e 100644 --- a/src/screens/charging-stations/list/ChargingStations.tsx +++ b/src/screens/charging-stations/list/ChargingStations.tsx @@ -92,7 +92,7 @@ export default class ChargingStations extends BaseAutoRefreshScreen { - const { filters } = this.state; // Get the current location let currentLocation = (await LocationManager.getInstance()).getLocation(); this.locationEnabled = !!currentLocation; // Bypass location - if (!filters.location) { - currentLocation = null; - } return currentLocation; } diff --git a/src/screens/charging-stations/list/ChargingStationsFilters.tsx b/src/screens/charging-stations/list/ChargingStationsFilters.tsx index dd0270693..9042fbbce 100644 --- a/src/screens/charging-stations/list/ChargingStationsFilters.tsx +++ b/src/screens/charging-stations/list/ChargingStationsFilters.tsx @@ -24,7 +24,6 @@ interface State extends ScreenFiltersState { } export interface ChargingStationsFiltersDef { - location?: boolean; connectorStatus?: ChargePointStatus; connectorType?: string; } @@ -58,7 +57,7 @@ export default class ChargingStationsFilters extends ScreenFilters { }; public render = () => { - const { initialFilters, locationEnabled } = this.props; + const { initialFilters } = this.props; const { filters } = this.state; const style = computeStyleSheet(); const controlStyle = computeControlStyleSheet(); @@ -81,18 +80,6 @@ export default class ChargingStationsFilters extends ScreenFilters { ) => this.addVisibleFilter(onlyAvailableChargingStationSwitchFilterControlComponent)} /> - {locationEnabled && ( - this.getFilterVisibleContainerComponent().setFilter(id, value)} - ref={async (locationSwitchFilterControlComponent: LocationSwitchFilterControlComponent) => - this.addVisibleFilter(locationSwitchFilterControlComponent) - } - /> - )}