@nativescript-community/perms
Advanced tools
Comparing version 2.1.4 to 2.1.5
@@ -6,2 +6,10 @@ # Change Log | ||
## [2.1.5](https://github.com/nativescript-community/perms/compare/v2.1.4...v2.1.5) (2021-01-13) | ||
**Note:** Version bump only for package @nativescript-community/perms | ||
## [2.1.4](https://github.com/nativescript-community/perms/compare/v2.1.3...v2.1.4) (2020-11-23) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@nativescript-community/perms", | ||
"version": "2.1.4", | ||
"version": "2.1.5", | ||
"description": "An unified permissions API for NativeScript on iOS and Android.", | ||
@@ -35,3 +35,3 @@ "main": "./permissions", | ||
"readmeFilename": "README.md", | ||
"gitHead": "2fe7ad16c20f1ee2491ac080c91c69f7b373675a" | ||
"gitHead": "05b6b3753992b9e671a8b7a1f1df53ed7a5c71f7" | ||
} |
@@ -107,13 +107,18 @@ import { Trace } from '@nativescript/core'; | ||
if (args.requestCode === requestCode) { | ||
if (args.grantResults.length > 0 && args.grantResults[0] === android.content.pm.PackageManager.PERMISSION_GRANTED) { | ||
resolve(PermissionStatus.GRANTED); | ||
} | ||
else { | ||
if (activity.shouldShowRequestPermissionRationale(permission)) { | ||
resolve(PermissionStatus.DENIED); | ||
if (args.grantResults.length > 0) { | ||
if (args.grantResults.length > 0 && args.grantResults[0] === android.content.pm.PackageManager.PERMISSION_GRANTED) { | ||
resolve(PermissionStatus.GRANTED); | ||
} | ||
else { | ||
resolve(PermissionStatus.NEVER_ASK_AGAIN); | ||
if (activity.shouldShowRequestPermissionRationale(permission)) { | ||
resolve(PermissionStatus.DENIED); | ||
} | ||
else { | ||
resolve(PermissionStatus.NEVER_ASK_AGAIN); | ||
} | ||
} | ||
} | ||
else { | ||
reject(); | ||
} | ||
} | ||
@@ -120,0 +125,0 @@ }); |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
104068
1144
0