修正
This commit is contained in:
parent
48a8dba1c0
commit
343a0ad06e
2
App.js
2
App.js
@ -25,7 +25,7 @@ if (Platform.OS === "android") {
|
||||
}
|
||||
export default function App() {
|
||||
const navigationRef = useRef();
|
||||
useEffect(() => UpdateAsync(), []);
|
||||
useEffect(UpdateAsync, []);
|
||||
return (
|
||||
<NavigationContainer name="Root" ref={navigationRef} style={{ flex: 1 }}>
|
||||
<Tab.Navigator>
|
||||
|
@ -14,15 +14,9 @@ export default function Setting(props) {
|
||||
const [mapSwitch, setMapSwitch] = useState(undefined);
|
||||
const [stationMenu, setStationMenu] = useState(undefined);
|
||||
useEffect(() => {
|
||||
AsyncStorage.getItem("iconSwitch").then((d) => {
|
||||
setIconSetting(d);
|
||||
});
|
||||
AsyncStorage.getItem("mapSwitch").then((d) => {
|
||||
setMapSwitch(d);
|
||||
});
|
||||
AsyncStorage.getItem("stationSwitch").then((d) => {
|
||||
setStationMenu(d);
|
||||
});
|
||||
AsyncStorage.getItem("iconSwitch").then(setIconSetting);
|
||||
AsyncStorage.getItem("mapSwitch").then(setMapSwitch);
|
||||
AsyncStorage.getItem("stationSwitch").then(setStationMenu);
|
||||
}, []);
|
||||
return (
|
||||
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
||||
|
Loading…
Reference in New Issue
Block a user