恐らく関連列車ボタンが動作しないバグを修正

This commit is contained in:
harukin-OneMix4 2024-02-14 01:28:24 +09:00
parent 6b12dcbcf6
commit fe8df6af2e
3 changed files with 14 additions and 8 deletions

View File

@ -362,6 +362,7 @@ export default function Apps({ navigation, webview, stationData }) {
originalStationList,
openStationACFromEachTrainInfo,
from: "Train",
setTrainInfo,
}}
/>
</View>

View File

@ -43,6 +43,7 @@ export const EachTrainInfoCore = ({
originalStationList,
openStationACFromEachTrainInfo,
from,
setTrainInfo,
}) => {
// const [actionSheetHorizonalScroll, setActionSheetHorizonalScroll] = useState(false);
@ -198,12 +199,16 @@ export const EachTrainInfoCore = ({
originalStationList,
from: "AllTrainDiagramView",
};
SheetManager.hide("EachTrainInfo").then(() => {
//0.1秒待機してから開く
setTimeout(() => {
SheetManager.show("EachTrainInfo", { payload });
}, 1);
});
if (setTrainInfo) {
setTrainInfo(payload.data);
} else {
SheetManager.hide("EachTrainInfo").then(() => {
//0.1秒待機してから開く
setTimeout(() => {
SheetManager.show("EachTrainInfo", { payload });
}, 1);
});
}
};
return (
<View

View File

@ -2,10 +2,10 @@
// stopStationIDListは停車駅の駅IDの配列 [Y01,Y02,Y05,...]
export const findReversalPoints = (array, stopStationIDList) => {
try {
if (!stopStationIDList.length) return [];
if (!stopStationIDList) return [];
// arrayが二次元配列だったら早期リターン
if (!array instanceof Array) return [];
if (!array.length) return [];
if (!array) return [];
if (array[0] instanceof Array) return [];
const arrayNumber = array.map((d) => ({
line: d