1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-27 23:28:38 +02:00

Ask permission to use geo-location

This commit is contained in:
Laurent Cozic
2020-10-16 13:02:32 +01:00
parent 66059939a3
commit cfd63fe46f
4 changed files with 30 additions and 7 deletions

View File

@ -100,8 +100,8 @@ class ConfigScreenComponent extends BaseScreenComponent {
const exportPath = this.state.profileExportPath;
const resourcePath = `${exportPath}/resources`;
try {
const hasPermissions = await checkPermissions(PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE);
if (!hasPermissions) {
const response = await checkPermissions(PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE);
if (response !== PermissionsAndroid.RESULTS.GRANTED) {
throw new Error('Permission denied');
}