mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 01:01:56 +01:00
fix: permissions handling at first launch
This commit is contained in:
parent
5733acb77a
commit
8cb96f1e45
1 changed files with 2 additions and 3 deletions
|
@ -18,13 +18,12 @@ class NavigationViewModel extends IndexTrackingViewModel {
|
|||
Future<void> initialize(BuildContext context) async {
|
||||
locator<Toast>().initialize(context);
|
||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
requestManageExternalStorage();
|
||||
await requestManageExternalStorage();
|
||||
|
||||
if (prefs.getBool('permissionsRequested') == null) {
|
||||
await Permission.storage.request();
|
||||
await Permission.manageExternalStorage.request();
|
||||
await prefs.setBool('permissionsRequested', true);
|
||||
RootAPI().hasRootPermissions().then(
|
||||
await RootAPI().hasRootPermissions().then(
|
||||
(value) => Permission.requestInstallPackages.request().then(
|
||||
(value) => Permission.ignoreBatteryOptimizations.request(),
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue