mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 09:07:47 +01:00
fix: Request permissions a single time at boot
This commit is contained in:
parent
a3dca8c142
commit
9c3626c8ed
1 changed files with 6 additions and 3 deletions
|
@ -31,9 +31,12 @@ class NavigationViewModel extends IndexTrackingViewModel {
|
|||
: Brightness.light,
|
||||
),
|
||||
);
|
||||
RootAPI().hasRootPermissions();
|
||||
Permission.requestInstallPackages.request();
|
||||
Permission.ignoreBatteryOptimizations.request();
|
||||
if (prefs.getBool('permissionsRequested') == null) {
|
||||
await prefs.setBool('permissionsRequested', true);
|
||||
RootAPI().hasRootPermissions();
|
||||
Permission.requestInstallPackages.request();
|
||||
Permission.ignoreBatteryOptimizations.request();
|
||||
}
|
||||
}
|
||||
|
||||
Widget getViewForIndex(int index) {
|
||||
|
|
Loading…
Reference in a new issue