Skip to content

Commit

Permalink
feat: Remove full external storage access (ReVanced#1381)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminHalko authored Oct 15, 2023
1 parent 5d5f311 commit f334da9
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lib/ui/views/navigation/navigation_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class NavigationViewModel extends IndexTrackingViewModel {
Future<void> initialize(BuildContext context) async {
locator<Toast>().initialize(context);
final SharedPreferences prefs = await SharedPreferences.getInstance();
await requestManageExternalStorage();

if (prefs.getBool('permissionsRequested') == null) {
await Permission.storage.request();
Expand Down Expand Up @@ -60,17 +59,6 @@ class NavigationViewModel extends IndexTrackingViewModel {
);
}

Future<void> requestManageExternalStorage() async {
final manageExternalStorageStatus =
await Permission.manageExternalStorage.status;
if (manageExternalStorageStatus.isDenied) {
await Permission.manageExternalStorage.request();
}
if (manageExternalStorageStatus.isPermanentlyDenied) {
await openAppSettings();
}
}

Widget getViewForIndex(int index) {
switch (index) {
case 0:
Expand Down

0 comments on commit f334da9

Please sign in to comment.