From d627617ca0c14c9f7fec5c5e7f3e3f5d8d6f5c0a Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Fri, 3 Mar 2023 21:37:34 +0900 Subject: [PATCH] =?UTF-8?q?=E5=B4=A9=E3=82=8C=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 4 +++- components/駅名表/Sign.js | 1 - menu.js | 30 +++++++++++++++--------------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/App.js b/App.js index 40877ee..9fd49de 100644 --- a/App.js +++ b/App.js @@ -239,7 +239,9 @@ function MenuPage({ AS.getItem("favoriteStation") .then((d) => { const returnData = JSON.parse(d); - setFavoriteStation(returnData); + if (favoriteStation.toString() != d) { + setFavoriteStation(returnData); + } }) .catch((d) => console.log(d)); }); diff --git a/components/駅名表/Sign.js b/components/駅名表/Sign.js index e641f97..79e7b33 100644 --- a/components/駅名表/Sign.js +++ b/components/駅名表/Sign.js @@ -48,7 +48,6 @@ export default function Sign(props) { setNexPrePosition(0); return () => {}; } - LayoutAnimation.easeInEaseOut(); setNexPrePosition( nexPrePosition + 1 == currentStation.length ? 0 : nexPrePosition + 1 ); diff --git a/menu.js b/menu.js index 2b706c1..4563941 100644 --- a/menu.js +++ b/menu.js @@ -3,11 +3,11 @@ import Carousel from "react-native-snap-carousel"; import { Platform, View, - LayoutAnimation, ScrollView, Linking, Text, TouchableOpacity, + ToastAndroid, } from "react-native"; import Constants from "expo-constants"; import { ListItem } from "native-base"; @@ -126,7 +126,6 @@ export default function Menu(props) { pre.push(...current); return pre; }, []); - LayoutAnimation.easeInEaseOut(); if (returnDataBase.length) { let currentStation = currentStation == undefined ? [] : currentStation; if (currentStation.toString() != returnDataBase.toString()) { @@ -142,8 +141,6 @@ export default function Menu(props) { const [getTime, setGetTime] = useState(new Date()); const [loadingDelayData, setLoadingDelayData] = useState(true); const carouselRef = useRef(); - const scrollRef = useRef(); - const [isScroll, setIsScroll] = useState(true); const [selectedCurrentStation, setSelectedCurrentStation] = useState(0); useEffect(() => { @@ -152,7 +149,6 @@ export default function Menu(props) { ) .then((response) => response.text()) .then((data) => setDelayData(data !== "" ? data.split("^") : null)) - .then(LayoutAnimation.easeInEaseOut) .then(() => setGetTime(new Date())) .finally(() => setLoadingDelayData(false)); }, [loadingDelayData]); @@ -167,11 +163,8 @@ export default function Menu(props) { > - + + - + + + { size={30} style={{ margin: 5 }} onPress={() => { - LayoutAnimation.easeInEaseOut(); setLoadingDelayData(true); }} /> @@ -411,9 +405,9 @@ const JRSTraInfoBox = (props) => { ); }; -const FixedContent = (props) => { +const FixedContentTop = (props) => { return ( - + <> { 列車の運行計画・混雑状況・感染症対策への取り組み + + ); +}; +const FixedContentBottom = (props) => { + return ( + <> {props.children} @@ -709,6 +709,6 @@ const FixedContent = (props) => { height="200" source={require("./assets/トレインビジョン関係/1.svg")} /> */} - + ); };