From 5fd6484a3780695bfa7fb33410421f18182b48ee Mon Sep 17 00:00:00 2001 From: Tsubasa SEKIGUCHI Date: Thu, 10 Oct 2024 19:33:47 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E6=99=AE=E9=80=9A/=E5=90=84=E5=81=9C?= =?UTF-8?q?=E3=81=A7=E7=B5=8C=E8=B7=AF=E9=81=B8=E6=8A=9E=E3=82=92=E7=A2=BA?= =?UTF-8?q?=E5=AE=9A=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84=E3=83=90=E3=82=B0?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/RouteList.tsx | 4 ++-- src/components/RouteListModal.tsx | 2 +- src/components/TrainTypeInfoModal.tsx | 6 +++--- src/screens/RouteSearchScreen.tsx | 14 ++++---------- 4 files changed, 10 insertions(+), 16 deletions(-) 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 From 6a4693770a422667756a29f7d35ffcab5d3ba793 Mon Sep 17 00:00:00 2001 From: Tsubasa SEKIGUCHI Date: Thu, 10 Oct 2024 19:39:36 +0900 Subject: [PATCH 2/2] bump version --- android/app/build.gradle | 2 +- android/wearable/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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") {