Compare commits

..

No commits in common. "540225d04d4fa8fcf27485a2c327f41ff208ef4f" and "248f621605a0fba70b44f8c2c4f0f974bcc6cb77" have entirely different histories.

2 changed files with 4 additions and 14 deletions

View File

@ -28,12 +28,6 @@
{
"initialOrientation": "DEFAULT"
}
],
[
"expo-location",
{
"locationWhenInUsePermission": "この位置情報は、リンク画面で現在地側近の駅情報を取得するのに使用されます。"
}
]
],
"version": "5.0",
@ -50,8 +44,8 @@
},
"assetBundlePatterns": ["**/*"],
"ios": {
"buildNumber": "38",
"supportsTablet": false,
"buildNumber": "34",
"supportsTablet": true,
"bundleIdentifier": "jrshikokuinfo.xprocess.hrkn",
"config": {
"googleMapsApiKey": "AIzaSyAVGDTjBkR_0wkQiNkoo5WDLhqXCjrjk8Y"

View File

@ -41,16 +41,12 @@ export default function Menu({ getCurrentTrain }) {
const [locationStatus, setLocationStatus] = useState(null);
useEffect(() => {
Location.requestForegroundPermissionsAsync().then((data) => {
setLocationStatus(
Platform.OS == "ios"
? data.status == "granted"
: data.android.accuracy == "fine"
);
setLocationStatus(data.status);
});
}, []);
const getCurrentPosition = () => {
if (!locationStatus) return () => {};
if (locationStatus !== "granted") return () => {};
Location.getCurrentPositionAsync({}).then((location) =>
makeCurrentStation(location)
);