mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 01:01:56 +01:00
feat: Remove full external storage access (#1381)
This commit is contained in:
parent
5d5f311e36
commit
f334da95ff
1 changed files with 0 additions and 12 deletions
|
@ -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();
|
||||
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue