Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/LocationPermissionModal/index.android.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ function LocationPermissionModal({startPermissionFlow, resetPermissionFlow, onDe
}, [startPermissionFlow]);

const handledBlockedPermission = (cb: () => void) => () => {
setIsLoading(true);
if (hasError && Linking.openSettings) {
Linking.openSettings();
setShowModal(false);
setHasError(false);
resetPermissionFlow();
return;
}
setIsLoading(true);
cb();
};

Expand Down
3 changes: 2 additions & 1 deletion src/components/LocationPermissionModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function LocationPermissionModal({startPermissionFlow, resetPermissionFlow, onDe
const checkPermission = useCallback(() => {
getLocationPermission().then((status) => {
if (status !== RESULTS.GRANTED && status !== RESULTS.LIMITED) {
setHasError(status === RESULTS.BLOCKED);
return;
}
onGrant();
Expand Down Expand Up @@ -73,7 +74,6 @@ function LocationPermissionModal({startPermissionFlow, resetPermissionFlow, onDe
}, [startPermissionFlow]);

const handledBlockedPermission = (cb: () => void) => () => {
setIsLoading(true);
if (hasError) {
if (Linking.openSettings) {
Linking.openSettings();
Expand All @@ -90,6 +90,7 @@ function LocationPermissionModal({startPermissionFlow, resetPermissionFlow, onDe
setShowModal(false);
return;
}
setIsLoading(true);
cb();
};

Expand Down
Loading