Skip to content

Commit 6249244

Browse files
authored
Merge pull request #735 from OneSignal/fix/permission_not_updating
Fix permission not updating until start of session
2 parents 570532a + d9e8ece commit 6249244

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/src/notifications.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ class OneSignalNotifications {
119119

120120
Future<void> lifecycleInit() async {
121121
_permission = await _channel.invokeMethod("OneSignal#permission");
122+
addPermissionObserver((permission) {
123+
_permission = permission;
124+
});
122125
return await _channel.invokeMethod("OneSignal#lifecycleInit");
123126
}
124127

0 commit comments

Comments
 (0)