mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-02 05:40:15 +02:00
Less restrictive install permission requests (#488)
This commit is contained in:
@@ -120,7 +120,7 @@ class SettingsProvider with ChangeNotifier {
|
||||
return result;
|
||||
}
|
||||
|
||||
Future<void> getInstallPermission() async {
|
||||
Future<void> getInstallPermission({bool enforce = false}) async {
|
||||
while (!(await Permission.requestInstallPackages.isGranted)) {
|
||||
// Explicit request as InstallPlugin request sometimes bugged
|
||||
Fluttertoast.showToast(
|
||||
@@ -129,6 +129,9 @@ class SettingsProvider with ChangeNotifier {
|
||||
PermissionStatus.granted) {
|
||||
break;
|
||||
}
|
||||
if (!enforce) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user