diff --git a/android/app/build.gradle b/android/app/build.gradle index f6c1972c7..4d4d99ca5 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -121,7 +121,7 @@ android { applicationIdSuffix ".dev" versionNameSuffix "-dev" // 10203010 <- 10203(v1.2.3 version name)+01(build number)+0(Android app) - versionCode 80000460 + versionCode 80000470 versionName "8.0.0" } prod { diff --git a/android/wearable/build.gradle.kts b/android/wearable/build.gradle.kts index 36bf7291c..d6a08f96b 100644 --- a/android/wearable/build.gradle.kts +++ b/android/wearable/build.gradle.kts @@ -34,7 +34,7 @@ android { applicationIdSuffix = ".dev" versionNameSuffix = "-dev" // 10203011 <- 10203(v1.2.3 version name)+01(build number)+1(Wearable app) - versionCode = 80000461 + versionCode = 80000471 versionName = "8.0.0" } create("prod") { diff --git a/src/components/RouteList.tsx b/src/components/RouteList.tsx index 58edc3677..6d2d0ad21 100644 --- a/src/components/RouteList.tsx +++ b/src/components/RouteList.tsx @@ -85,7 +85,7 @@ export const RouteList = ({ loading, }: { routes: Route[] - onSelect: (item: Route) => void + onSelect: (item: Route | undefined) => void loading: boolean }) => { const [trainTypeInfoModalVisible, setTrainTypeInfoModalVisible] = @@ -174,7 +174,7 @@ export const RouteList = ({ disabled={loading} stations={selectedRoute?.stops ?? []} onClose={() => setTrainTypeInfoModalVisible(false)} - onConfirmed={() => selectedRoute && onSelect(selectedRoute)} + onConfirmed={() => onSelect(selectedRoute)} /> ) diff --git a/src/components/RouteListModal.tsx b/src/components/RouteListModal.tsx index d63b0c86f..3a24548d3 100644 --- a/src/components/RouteListModal.tsx +++ b/src/components/RouteListModal.tsx @@ -25,7 +25,7 @@ type Props = { isTrainTypesLoading: boolean error: ConnectError | null onClose: () => void - onSelect: (route: Route) => void + onSelect: (route: Route | undefined) => void } const styles = StyleSheet.create({ diff --git a/src/components/TrainTypeInfoModal.tsx b/src/components/TrainTypeInfoModal.tsx index 23bac1d0a..3dafca6e0 100644 --- a/src/components/TrainTypeInfoModal.tsx +++ b/src/components/TrainTypeInfoModal.tsx @@ -25,7 +25,7 @@ type Props = { disabled?: boolean error: ConnectError | null onClose: () => void - onConfirmed: (trainType: TrainType) => void + onConfirmed: (trainType: TrainType | undefined) => void } const styles = StyleSheet.create({ @@ -223,8 +223,8 @@ export const TrainTypeInfoModal: React.FC = ({ diff --git a/src/screens/RouteSearchScreen.tsx b/src/screens/RouteSearchScreen.tsx index cb28e41eb..c58a38712 100644 --- a/src/screens/RouteSearchScreen.tsx +++ b/src/screens/RouteSearchScreen.tsx @@ -146,15 +146,9 @@ const RouteSearchScreen = () => { selectedLine: stationFromSearch.line ?? null, })) setSelectedStation(stationFromSearch) - - if (stationFromSearch.hasTrainTypes) { - setIsRouteListModalVisible(true) - return - } - - navigation.navigate('SelectBound') + setIsRouteListModalVisible(true) }, - [navigation, setLineState] + [setLineState] ) const onKeyPress = useCallback( @@ -174,8 +168,8 @@ const RouteSearchScreen = () => { ) const handleSelect = useCallback( - async (route: Route) => { - const trainType = route.stops.find( + async (route: Route | undefined) => { + const trainType = route?.stops.find( (s) => s.groupId === currentStation?.groupId )?.trainType