Skip to content

Commit a503c40

Browse files
authored
feat(local-notifications): use updated perms dependency + simplify authorization check (#639)
Note: Requires major version bump due to transient dep switch.
1 parent e3889ad commit a503c40

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

packages/local-notifications/index.android.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class LocalNotificationsImpl extends LocalNotificationsCommon implements
121121
success: (notification) => {
122122
onReceived(JSON.parse(notification));
123123
},
124-
})
124+
}),
125125
);
126126
resolve();
127127
} catch (ex) {
@@ -140,7 +140,7 @@ export class LocalNotificationsImpl extends LocalNotificationsCommon implements
140140
success: (notification) => {
141141
onReceived(JSON.parse(notification));
142142
},
143-
})
143+
}),
144144
);
145145
resolve();
146146
} catch (ex) {
@@ -295,9 +295,8 @@ export class LocalNotificationsImpl extends LocalNotificationsCommon implements
295295
}
296296
}
297297

298-
private static isAuthorized(result: Result): boolean {
299-
const [status, _] = result;
300-
return status === 'authorized';
298+
private static isAuthorized(result: Result<'notification'>): boolean {
299+
return result === 'authorized';
301300
}
302301
}
303302

packages/local-notifications/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@
4646
"homepage": "https://github.com/nativescript/plugins",
4747
"dependencies": {
4848
"@nativescript/shared-notification-delegate": "~1.0.0",
49-
"@nativescript-community/perms": "^2.3.0"
49+
"@nativescript-community/perms": "^3.0.4"
5050
}
5151
}

0 commit comments

Comments
 (0)