Compare commits

..

No commits in common. "7e0afd1186652e8da464122297c20457e11bdb3a" and "72158d6d330940208c9cef71c1fa93ac267d1592" have entirely different histories.

5 changed files with 15 additions and 31 deletions

View File

@ -180,7 +180,6 @@ export const EachTrainInfoCore = ({
if (!points) return () => {};
if (points.length == 0) return () => {};
const position = points.findIndex((d) => d == true);
let isThrew = false;
if (position == -1) return () => {};
if (trainDataWidhThrough[position].split(",")[1] == "通過") {
LayoutAnimation.configureNext({
@ -188,18 +187,14 @@ export const EachTrainInfoCore = ({
update: { type: "easeInEaseOut", springDamping: 0.6 },
});
setShowThrew(true);
isThrew = true;
}
if (position < 5) {
} // 5駅以内の場合はスクロールしない
else {
const count = position * 44 - 50;
// 0.5秒待機してからスクロール
setTimeout(
() => ScrollViewRef.current?.scrollTo({ y: count, animated: true }),
400
);
}
if(position < 5) return() => {}; // 5駅以内の場合はスクロールしない
const count = position * 44-50;
// 0.5秒待機してからスクロール
setTimeout(
() => ScrollViewRef.current?.scrollTo({ y: count, animated: true }),
400
);
setIsJumped(true);
}, [points]);
const trainName = useMemo(() => {

View File

@ -12,7 +12,7 @@ import * as Updates from "expo-updates";
import { useWindowDimensions } from "react-native";
import { ListItem } from "native-base";
const versionCode = "5.5";
const versionCode = "5.4.1";
export const SettingTopPage = ({ navigate, testNFC, updateAndReload }) => {
const { width } = useWindowDimensions();

View File

@ -102,18 +102,14 @@ export const EachData: FC<Props> = (props) => {
};
const [platformNumber, setPlatformNumber] = useState<number>();
const [platformDescription, setPlatformDescription] = useState<string>();
useEffect(() => {
fetch(
`https://n8n.haruk.in/webhook/JR-shikoku-PosID?PosNum=${currentTrainData?.PosNum}&Line=${currentTrainData?.Line}`
)
.then((res) => res.json())
.then((data) => {
setPlatformNumber(data?.type == "Station" ? data?.platform : undefined);
setPlatformDescription(
data?.type == "Station" ? data?.description : undefined
);
});
.then((data) =>
setPlatformNumber(data?.type == "Station" ? data?.platform : undefined)
);
}, [currentTrainData, currentTrain]);
return (
@ -145,11 +141,9 @@ export const EachData: FC<Props> = (props) => {
<Description
info={`${
trainIDSwitch
? currentTrainData?.PosNum + currentTrainData?.Line
? currentTrainData?.PosNum+currentTrainData?.Line
: trainPositionText(currentTrainData)
} ${platformNumber ? platformNumber + "番線" : ""} ${
platformDescription ? "("+platformDescription+")" : ""
}`}
} ${platformNumber ? platformNumber + "番線" : ""}`}
onLongClick={() => {
Linking.openURL(
"https://nexcloud.haruk.in/apps/forms/s/TEkBQW5WLcYjLyAzGxncQLtw"

View File

@ -1 +1 @@
export const news = "2024-11-01";
export const news = "2024-9-29";

View File

@ -770,7 +770,6 @@ export const injectJavascriptData: InjectJavascriptData = (
case "5210M":
case "5108M":
case "110M":
case "112M":
case "118M":
case "5218M":
case "5120M":
@ -818,6 +817,7 @@ export const injectJavascriptData: InjectJavascriptData = (
setStationIcon(element.querySelector("img"),'https://storage.haruk.in/s7200.png');
break;
// 上り7000系
case "112M":
case "114M":
case "122M":
case "4138M":
@ -847,10 +847,6 @@ export const injectJavascriptData: InjectJavascriptData = (
: ``;
const normal_train_name = `
if(.match("サンポート")){
const textBase = .split(":")[1];
.innerText = textBase+.innerText;
}
if(new RegExp(/^4[1-9]\\d\\d[DM]$/).test() || new RegExp(/^5[1-7]\\d\\d[DM]$/).test() || ==="3621D"){
.innerText = "ワンマン\\n"+.innerText;
flag=true;
@ -958,7 +954,6 @@ const setStrings = () =>{
}
var = element.getElementsByTagName("p")[0];
var = element.getAttribute('offclick').split('"')[1];
var = element.getAttribute('offclick').split('"')[3];
var flag=false;
var TrainType = undefined;
setTrainMenuDialog(element)