崩れの修正
This commit is contained in:
parent
f6a88f09e4
commit
d627617ca0
4
App.js
4
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));
|
||||
});
|
||||
|
@ -48,7 +48,6 @@ export default function Sign(props) {
|
||||
setNexPrePosition(0);
|
||||
return () => {};
|
||||
}
|
||||
LayoutAnimation.easeInEaseOut();
|
||||
setNexPrePosition(
|
||||
nexPrePosition + 1 == currentStation.length ? 0 : nexPrePosition + 1
|
||||
);
|
||||
|
30
menu.js
30
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) {
|
||||
>
|
||||
<StatusbarDetect />
|
||||
<TitleBar />
|
||||
<FixedContent
|
||||
scrollRef={scrollRef}
|
||||
isScroll={isScroll}
|
||||
navigate={navigate}
|
||||
>
|
||||
<ScrollView>
|
||||
<FixedContentTop navigate={navigate} />
|
||||
<Carousel
|
||||
ref={carouselRef}
|
||||
layout={"default"}
|
||||
@ -221,7 +214,9 @@ export default function Menu(props) {
|
||||
loadingDelayData={loadingDelayData}
|
||||
delayData={delayData}
|
||||
/>
|
||||
</FixedContent>
|
||||
<FixedContentBottom navigate={navigate} />
|
||||
</ScrollView>
|
||||
|
||||
<StationDeteilView
|
||||
StationBoardAcSR={StationBoardAcSR}
|
||||
currentStation={
|
||||
@ -367,7 +362,6 @@ const JRSTraInfoBox = (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 (
|
||||
<ScrollView ref={props.scrollRef} scrollEnabled={props.isScroll}>
|
||||
<>
|
||||
<TopMenuButton />
|
||||
<TextBox
|
||||
backgroundColor="#0099CC"
|
||||
@ -431,6 +425,12 @@ const FixedContent = (props) => {
|
||||
列車の運行計画・混雑状況・感染症対策への取り組み
|
||||
</Text>
|
||||
</TextBox>
|
||||
</>
|
||||
);
|
||||
};
|
||||
const FixedContentBottom = (props) => {
|
||||
return (
|
||||
<>
|
||||
{props.children}
|
||||
|
||||
<View style={{ flexDirection: "row" }}>
|
||||
@ -709,6 +709,6 @@ const FixedContent = (props) => {
|
||||
height="200"
|
||||
source={require("./assets/トレインビジョン関係/1.svg")}
|
||||
/> */}
|
||||
</ScrollView>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user