アイコン更新画面を作成

This commit is contained in:
harukin-expo-dev-env
2025-03-10 15:24:11 +00:00
parent a9488b98bc
commit 0838414540
5 changed files with 210 additions and 19 deletions

View File

@@ -1,6 +1,6 @@
import React, { useEffect } from "react";
import { createStackNavigator } from "@react-navigation/stack";
import { CommonActions } from "@react-navigation/native";
import { SheetManager } from "react-native-actions-sheet";
import { AS } from "./storageControl";
import TrainBase from "./components/trainbaseview";
import HowTo from "./howto";
@@ -9,7 +9,6 @@ import News from "./components/news";
import Setting from "./components/Settings/settings";
import { useFavoriteStation } from "./stateBox/useFavoriteStation";
import { optionData } from "./lib/stackOption";
import CurrentTrainListView from "./components/CurrentTrainListView";
import AllTrainDiagramView from "./components/AllTrainDiagramView";
import { useCurrentTrain } from "./stateBox/useCurrentTrain";
import { useNavigation } from "@react-navigation/native";
@@ -37,6 +36,11 @@ export function MenuPage() {
if (d != news) navigation.navigate("topMenu", { screen: "news" });
})
.catch(() => navigation.navigate("topMenu", { screen: "news" }));
AS.getItem("isSetIcon")
.then((isSetIcon) => {
if (isSetIcon == "true") SheetManager.show("TrainIconUpdate");
})
.catch((error) => console.error("Error fetching icon setting:", error));
}, []);
useEffect(() => {
const unsubscribe = addListener("tabPress", (e) => {