diff --git a/App.js b/App.js index f03ea13..755c6f8 100644 --- a/App.js +++ b/App.js @@ -6,7 +6,7 @@ import { } from "@react-navigation/stack"; import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; import { AntDesign, Ionicons } from "@expo/vector-icons"; -import { ToastAndroid, Platform, UIManager } from "react-native"; +import { Platform, UIManager } from "react-native"; import { UpdateAsync } from "./UpdateAsync.js"; import Apps from "./Apps"; import tndView from "./ndView"; diff --git a/Apps.js b/Apps.js index ae40bf8..386e0c2 100644 --- a/Apps.js +++ b/Apps.js @@ -152,13 +152,16 @@ export default function Apps(props) { } }} onMessage={(event) => { + if (!originalStationList) { + alert("駅名標データを取得中..."); + return; + } if (event.nativeEvent.data.includes("PopUpMenu")) { const selectedStationPDFAddress = event.nativeEvent.data .split(",")[3] .replace("'", "") .replace("'", ""); - if (!originalStationList) alert("originalStationListがありません"); const findStationEachLine = (selectLine) => { let NearStation = selectLine.filter( (d) => d.StationTimeTable == selectedStationPDFAddress @@ -199,6 +202,7 @@ export default function Apps(props) { navigate("trainbase", { info: event.nativeEvent.data }); }} injectedJavaScript={injectJavascript} + onTouchMove={() => StationBoardAcSR.current?.hide()} /> diff --git a/UpdateAsync.js b/UpdateAsync.js index 3c26521..93b1d9f 100644 --- a/UpdateAsync.js +++ b/UpdateAsync.js @@ -5,21 +5,32 @@ export const UpdateAsync = () => Updates.checkForUpdateAsync() .then((update) => { if (!update.isAvailable) return; - ToastAndroid.showWithGravityAndOffset( - "アプリのデータを更新しています。", - ToastAndroid.LONG, - ToastAndroid.BOTTOM, - 25, - 50 - ); - Updates.fetchUpdateAsync().then(() => Updates.reloadAsync()); + if (Platform.OS == "ios") { + alert("アプリのデータを更新しています。"); + } else { + ToastAndroid.showWithGravityAndOffset( + "アプリのデータを更新しています。", + ToastAndroid.LONG, + ToastAndroid.BOTTOM, + 25, + 50 + ); + } + Updates.fetchUpdateAsync().then(Updates.reloadAsync); + return; }) - .catch((e) => - ToastAndroid.showWithGravityAndOffset( - e.toString(), - ToastAndroid.LONG, - ToastAndroid.BOTTOM, - 25, - 50 - ) - ); + .catch((e) => { + Platform.OS == "ios" + ? alert(e.toString()) + : ToastAndroid.showWithGravityAndOffset( + e.toString(), + ToastAndroid.LONG, + ToastAndroid.BOTTOM, + 25, + 50 + ); + return; + }) + .finally(() => { + return; + }); diff --git a/components/ActionSheetComponents/StationDeteilView.js b/components/ActionSheetComponents/StationDeteilView.js index f133555..73c171b 100644 --- a/components/ActionSheetComponents/StationDeteilView.js +++ b/components/ActionSheetComponents/StationDeteilView.js @@ -1,43 +1,12 @@ -import React, { Component, useRef, useState, useEffect } from "react"; -import { - StatusBar, - Platform, - View, - LayoutAnimation, - ScrollView, - Linking, - Text, - TouchableOpacity, -} from "react-native"; -import Image from "react-native-remote-svg"; -import Constants from "expo-constants"; -import { List, ListItem } from "native-base"; -import Icon from "react-native-vector-icons/Entypo"; -import * as Location from "expo-location"; +import React from "react"; +import { View, ScrollView, Linking } from "react-native"; import StatusbarDetect from "../../StatusbarDetect"; var Status = StatusbarDetect(); -import { useNavigation } from "@react-navigation/native"; -import AutoHeightImage from "react-native-auto-height-image"; -import { - widthPercentageToDP as wp, - heightPercentageToDP as hp, -} from "react-native-responsive-screen"; -import { - FontAwesome, - Fontisto, - Foundation, - Ionicons, - MaterialCommunityIcons, -} from "@expo/vector-icons"; -import * as WebBrowser from "expo-web-browser"; +import { FontAwesome, Foundation, Ionicons } from "@expo/vector-icons"; import ActionSheet from "react-native-actions-sheet"; -import LottieView from "lottie-react-native"; -import SvgUri from "react-native-svg-uri"; import Sign from "../../components/駅名表/Sign"; -import { UsefulBox } from "../atom/UsefulBox"; import { TicketBox } from "../atom/TicketBox"; -import { TextBox } from "../atom/TextBox"; export const StationDeteilView = (props) => { const { StationBoardAcSR, currentStation, originalStationList } = props; @@ -49,6 +18,7 @@ export const StationDeteilView = (props) => { CustomHeaderComponent={() => {}} > { }} /> - + {currentStation && ( { )} )} - + ); diff --git a/components/settings.js b/components/settings.js index 67a796d..0da7e66 100644 --- a/components/settings.js +++ b/components/settings.js @@ -102,7 +102,7 @@ export default function Setting(props) { textAlignVertical: "center", }} > - 内部バージョン: 4.4.2 + 内部バージョン: 4.4.2.1