Skip to content

Commit

Permalink
fix: after requesting not granted permissions, the result should be d…
Browse files Browse the repository at this point in the history
…ispatched on main thread
  • Loading branch information
korzonkiee committed Feb 27, 2024
1 parent a6715d9 commit 0b8430c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class CameraPermissions : EventChannel.StreamHandler, RequestPermissionsResultLi
// Request the not granted permissions
CoroutineScope(Dispatchers.IO).launch {
requestPermissions(activity, permissionsToAsk, PERMISSIONS_MULTIPLE_REQUEST) {
callback(permissionsGranted.apply { addAll(it) })
Dispatchers.Main.run { callback(permissionsGranted.apply { addAll(it) }) }
}
}
}
Expand Down

0 comments on commit 0b8430c

Please sign in to comment.