Skip to content

Commit

Permalink
Fix (PermissionsService) refresh permission on state resume
Browse files Browse the repository at this point in the history
- Fix (PermissionsService) refresh permission on current state resume and the previous stare different from it
  • Loading branch information
Elhan98 committed Jul 6, 2022
1 parent 5348c68 commit c1f08be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions kuama_permissions/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ dependencies:
kuama_permissions:
git:
url: https://github.com/Kuama-IT/kuama_dart.git
ref: release
path: kuama_permissions
ref: 0.2.2
kuama_position:
git:
url: https://github.com/Kuama-IT/kuama_dart.git
ref: release
path: kuama_position
ref: 0.2.2

shared_preferences: ^2.0.15
geolocator: ^9.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class PermissionsService {
Stream<void> get onRequiredPermissionsRefresh async* {
AppLifecycleState prevState = AppLifecycleState.paused;
await for (final state in _appLifecycleState.onChanges) {
if (prevState == AppLifecycleState.paused && state == AppLifecycleState.resumed) {
if (prevState != AppLifecycleState.resumed && state == AppLifecycleState.resumed) {
yield null;
}
prevState = state;
Expand Down

0 comments on commit c1f08be

Please sign in to comment.