mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: Request permissions a single time at boot
This commit is contained in:
parent
a3dca8c142
commit
9c3626c8ed
@ -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 New Issue
Block a user