Merge commit '57459d975bbe3a1b4e145331b57a638b2c2fead5'

This commit is contained in:
harukin-OneMix4 2023-12-29 02:09:44 +09:00
commit c2ad681891
8 changed files with 55 additions and 42 deletions

20
App.js
View File

@ -45,17 +45,17 @@ export default function App() {
return ( return (
<FavoriteStationProvider> <FavoriteStationProvider>
<TrainDelayDataProvider> <TrainDelayDataProvider>
<SheetProvider> <CurrentTrainProvider>
<CurrentTrainProvider> <AreaInfoProvider>
<AreaInfoProvider> <AllTrainDiagramProvider>
<AllTrainDiagramProvider> <BusAndTrainDataProvider>
<BusAndTrainDataProvider> <SheetProvider>
<AppContainer /> <AppContainer />
</BusAndTrainDataProvider> </SheetProvider>
</AllTrainDiagramProvider> </BusAndTrainDataProvider>
</AreaInfoProvider> </AllTrainDiagramProvider>
</CurrentTrainProvider> </AreaInfoProvider>
</SheetProvider> </CurrentTrainProvider>
</TrainDelayDataProvider> </TrainDelayDataProvider>
</FavoriteStationProvider> </FavoriteStationProvider>
); );

View File

@ -1,4 +1,4 @@
import React, { useEffect, useState } from "react"; import React, { useEffect, useState, useRef } from "react";
import { import {
View, View,
LayoutAnimation, LayoutAnimation,
@ -11,7 +11,10 @@ import {
Platform, Platform,
} from "react-native"; } from "react-native";
import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons"; import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons";
import ActionSheet, { SheetManager } from "react-native-actions-sheet"; import ActionSheet, {
SheetManager,
useScrollHandlers,
} from "react-native-actions-sheet";
import { AS } from "../../storageControl"; import { AS } from "../../storageControl";
import LottieView from "lottie-react-native"; import LottieView from "lottie-react-native";
import trainList from "../../assets/originData/trainList"; import trainList from "../../assets/originData/trainList";
@ -239,13 +242,18 @@ export const EachTrainInfo = (props) => {
.replace("マリン", "マリンライナー") .replace("マリン", "マリンライナー")
.replace("ライナーライナー", "ライナー"); .replace("ライナーライナー", "ライナー");
}; };
const actionSheetRef = useRef(null);
const scrollHandlers = useScrollHandlers("scrollview-1", actionSheetRef);
return ( return (
<ActionSheet gestureEnabled={isTop} CustomHeaderComponent={<></>}> <ActionSheet
gestureEnabled={isTop}
CustomHeaderComponent={<></>}
ref={actionSheetRef}
>
<View <View
style={{ style={{
backgroundColor: "#0099CC", backgroundColor: "#0099CC",
borderRadius: 5, borderTopRadius: 5,
borderColor: "dark", borderColor: "dark",
borderWidth: 1, borderWidth: 1,
}} }}
@ -504,21 +512,19 @@ export const EachTrainInfo = (props) => {
</ScrollView> </ScrollView>
)} )}
<ScrollView <ScrollView
style={{ maxHeight: heightPercentageToDP("55%") }} {...scrollHandlers}
style={{
maxHeight: heightPercentageToDP(
from == "AllTrainDiagramView" ? "70%" : "50%"
),
}}
nestedScrollEnabled nestedScrollEnabled
onScroll={(e) => { onScroll={(e) => {
if (!Platform.OS !== "android") return; if (!Platform.OS !== "android") return;
setIsTop(e.nativeEvent.contentOffset.y < 0); setIsTop(e.nativeEvent.contentOffset.y < 0);
}} }}
> >
<View <View style={{ padding: 10, backgroundColor: "white" }}>
style={{
padding: 10,
backgroundColor: "white",
borderBottomLeftRadius: 5,
borderBottomRightRadius: 5,
}}
>
<View style={{ alignItems: "center" }}> <View style={{ alignItems: "center" }}>
{/* <LottieView {/* <LottieView
autoPlay autoPlay

View File

@ -1,4 +1,4 @@
import React from "react"; import React, { useRef } from "react";
import { import {
View, View,
LayoutAnimation, LayoutAnimation,
@ -8,18 +8,24 @@ import {
TouchableOpacity, TouchableOpacity,
} from "react-native"; } from "react-native";
import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons"; import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons";
import ActionSheet from "react-native-actions-sheet"; import ActionSheet, { useScrollHandlers } from "react-native-actions-sheet";
import LottieView from "lottie-react-native"; import LottieView from "lottie-react-native";
import { useTrainDelayData } from "../../stateBox/useTrainDelayData"; import { useTrainDelayData } from "../../stateBox/useTrainDelayData";
export const JRSTraInfo = () => { export const JRSTraInfo = () => {
const { getTime, delayData, loadingDelayData, setLoadingDelayData } = const { getTime, delayData, loadingDelayData, setLoadingDelayData } =
useTrainDelayData(); useTrainDelayData();
const actionSheetRef = useRef(null);
const scrollHandlers = useScrollHandlers("scrollview-1", actionSheetRef);
return ( return (
<ActionSheet gestureEnabled CustomHeaderComponent={<></>}> <ActionSheet
gestureEnabled
CustomHeaderComponent={<></>}
ref={actionSheetRef}
>
<View <View
style={{ style={{
backgroundColor: "#0099CC", backgroundColor: "#0099CC",
borderRadius: 5, borderTopRadius: 5,
borderColor: "dark", borderColor: "dark",
borderWidth: 1, borderWidth: 1,
}} }}
@ -63,13 +69,11 @@ export const JRSTraInfo = () => {
}} }}
/> />
</View> </View>
<ScrollView> <ScrollView {...scrollHandlers}>
<View <View
style={{ style={{
padding: 10, padding: 10,
backgroundColor: "white", backgroundColor: "white",
borderBottomLeftRadius: 5,
borderBottomRightRadius: 5,
}} }}
> >
{loadingDelayData ? ( {loadingDelayData ? (

View File

@ -50,7 +50,7 @@ export const StationDeteilView = (props) => {
key={currentStation} key={currentStation}
style={{ style={{
backgroundColor: "white", backgroundColor: "white",
borderRadius: 5, borderTopRadius: 5,
borderColor: "dark", borderColor: "dark",
borderWidth: 1, borderWidth: 1,
}} }}

View File

@ -5,6 +5,7 @@ import {
TouchableOpacity, TouchableOpacity,
Linking, Linking,
ScrollView, ScrollView,
FlatList,
} from "react-native"; } from "react-native";
import MapView, { Marker } from "react-native-maps"; import MapView, { Marker } from "react-native-maps";
import { MaterialCommunityIcons } from "@expo/vector-icons"; import { MaterialCommunityIcons } from "@expo/vector-icons";
@ -58,12 +59,14 @@ export default function AllTrainDiagramView({ navigation: { navigate } }) {
}; };
return ( return (
<View style={{ backgroundColor: "#0099CC", height: "100%" }}> <View style={{ backgroundColor: "#0099CC", height: "100%" }}>
<ScrollView> <FlatList
{keyList && data={keyList}
keyList.map((key) => ( renderItem={({ item }) => (
<Item openTrainInfo={openTrainInfo} key={key} id={key} /> <Item openTrainInfo={openTrainInfo} id={item} />
))} )}
</ScrollView> keyExtractor={(item) => item}
initialNumToRender={100}
/>
<TouchableOpacity <TouchableOpacity
style={{ style={{

View File

@ -7,8 +7,8 @@ export const TextBox = (props) => {
style={{ style={{
flex: flex, flex: flex,
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
padding: 10, padding: 5,
height: 70, minHeight: 70,
alignItems: "center", alignItems: "center",
alignContent: "center", alignContent: "center",
margin: 2, margin: 2,

View File

@ -165,7 +165,7 @@ export default function Setting(props) {
textAlignVertical: "center", textAlignVertical: "center",
}} }}
> >
内部バージョン: 4.6 内部バージョン: 4.6.1
</Text> </Text>
<View style={{ flex: 1 }} /> <View style={{ flex: 1 }} />
</View> </View>

View File

@ -678,7 +678,7 @@ const FixedContentBottom = (props) => {
列番探索 列番探索
</Text> </Text>
<Text style={{ color: "white", fontSize: 18 }}> <Text style={{ color: "white", fontSize: 18 }}>
データベースに存在する全列車のダイヤを確認できる機能です データベースに存在する全列車のダイヤを探索
</Text> </Text>
</TextBox> </TextBox>
<Text style={{ fontWeight: "bold", fontSize: 20 }}> <Text style={{ fontWeight: "bold", fontSize: 20 }}>