From b91e38401f4abed392644d6abe7a35d3de626477 Mon Sep 17 00:00:00 2001 From: AlixH Date: Mon, 22 Nov 2021 16:22:19 +0100 Subject: [PATCH] Removed closest stations filter --- .../list/ChargingStations.tsx | 19 ++++++------------- .../list/ChargingStationsFilters.tsx | 15 +-------------- 2 files changed, 7 insertions(+), 27 deletions(-) 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) - } - /> - )}