メニューデフォルト表示に変更
This commit is contained in:
@@ -17,7 +17,7 @@ export const TrainDataView = ({
|
||||
}) => {
|
||||
const { width, height } = useWindowDimensions();
|
||||
const { isLandscape } = useDeviceOrientationChange();
|
||||
const { webview, getCurrentTrain } = useCurrentTrain();
|
||||
const { webview, getCurrentTrain, inject } = useCurrentTrain();
|
||||
const [mapsStationData, setMapsStationData] = useState(undefined);
|
||||
useEffect(() => {
|
||||
getStationList2().then(setMapsStationData);
|
||||
@@ -51,10 +51,10 @@ export const TrainDataView = ({
|
||||
}
|
||||
});
|
||||
if (!test.length) return;
|
||||
webview.current?.injectJavaScript(
|
||||
navigate("Apps");
|
||||
inject(
|
||||
`MoveDisplayStation('${test[0].line}_${test[0].station.MyStation}_${test[0].station.Station_JP}');setStrings();`
|
||||
);
|
||||
navigate("Apps");
|
||||
SheetManager.hide("EachTrainInfo");
|
||||
}}
|
||||
>
|
||||
|
@@ -235,12 +235,17 @@ export const EachTrainInfoCore = ({
|
||||
} else {
|
||||
SheetManager.hide("EachTrainInfo").then(() => {
|
||||
//0.1秒待機してから開く
|
||||
setTimeout(() => {
|
||||
SheetManager.show("EachTrainInfo", { payload });
|
||||
}, 2);
|
||||
setTimeout(() => SheetManager.show("EachTrainInfo", { payload }), 2);
|
||||
});
|
||||
}
|
||||
};
|
||||
const headerItem = {
|
||||
currentTrainData,
|
||||
currentPosition,
|
||||
nearTrainIDList,
|
||||
openTrainInfo,
|
||||
navigate,
|
||||
};
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
@@ -303,24 +308,8 @@ export const EachTrainInfoCore = ({
|
||||
maxHeight: isLandscape ? height - 94 : (height / 100) * 70,
|
||||
},
|
||||
}}
|
||||
shortHeader={
|
||||
<ShortHeader
|
||||
currentTrainData={currentTrainData}
|
||||
currentPosition={currentPosition}
|
||||
nearTrainIDList={nearTrainIDList}
|
||||
openTrainInfo={openTrainInfo}
|
||||
navigate={navigate}
|
||||
/>
|
||||
}
|
||||
longHeader={
|
||||
<LongHeader
|
||||
currentTrainData={currentTrainData}
|
||||
currentPosition={currentPosition}
|
||||
nearTrainIDList={nearTrainIDList}
|
||||
openTrainInfo={openTrainInfo}
|
||||
navigate={navigate}
|
||||
/>
|
||||
}
|
||||
shortHeader={<ShortHeader {...headerItem} />}
|
||||
longHeader={<LongHeader {...headerItem} />}
|
||||
topStickyContent={
|
||||
<ScrollStickyContent currentTrainData={currentTrainData} />
|
||||
}
|
||||
@@ -376,11 +365,11 @@ export const EachTrainInfoCore = ({
|
||||
)
|
||||
)}
|
||||
{tailStation.length != 0 &&
|
||||
tailStation.map((i, index) =>
|
||||
tailStation.map(({ station, dia }, index) =>
|
||||
showTailStation.findIndex((d) => d == index) == -1 ? (
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
const array = openBackTrainInfo(i.station, trainData, i.dia);
|
||||
const array = openBackTrainInfo(station, trainData, dia);
|
||||
|
||||
if (!array) return;
|
||||
setTrainData(array);
|
||||
|
Reference in New Issue
Block a user