diff --git a/lib/ui/views/navigation/navigation_viewmodel.dart b/lib/ui/views/navigation/navigation_viewmodel.dart index 684354cd03..5434b78a55 100644 --- a/lib/ui/views/navigation/navigation_viewmodel.dart +++ b/lib/ui/views/navigation/navigation_viewmodel.dart @@ -1,7 +1,11 @@ // ignore_for_file: use_build_context_synchronously +import 'package:app_installer/app_installer.dart'; +import 'package:device_apps/device_apps.dart'; import 'package:dynamic_themes/dynamic_themes.dart'; import 'package:flutter/material.dart'; import 'package:injectable/injectable.dart'; +import 'package:permission_handler/permission_handler.dart'; +import 'package:revanced_manager/services/root_api.dart'; import 'package:revanced_manager/ui/views/home/home_view.dart'; import 'package:revanced_manager/ui/views/patcher/patcher_view.dart'; import 'package:revanced_manager/ui/views/settings/settings_view.dart'; @@ -21,6 +25,8 @@ class NavigationViewModel extends IndexTrackingViewModel { DynamicTheme.of(context)!.setTheme(1); } } + RootAPI().hasRootPermissions(); + Permission.requestInstallPackages.request(); } Widget getViewForIndex(int index) { diff --git a/pubspec.yaml b/pubspec.yaml index ebffaf0377..99efc7038e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -49,6 +49,7 @@ dependencies: ref: feature/nullSafe package_info_plus: ^1.4.3+1 path_provider: ^2.0.11 + permission_handler: ^10.0.0 pull_to_refresh: ^2.0.0 root: ^2.0.2 share_extend: ^2.0.0