mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-11-09 17:43:29 +01:00
Use alternative storage dir if user-accessible one is null (#2392)
This commit is contained in:
@@ -9,7 +9,6 @@ import 'package:obtainium/app_sources/github.dart';
|
||||
import 'package:obtainium/main.dart';
|
||||
import 'package:obtainium/providers/apps_provider.dart';
|
||||
import 'package:obtainium/providers/source_provider.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:shared_storage/shared_storage.dart' as saf;
|
||||
@@ -35,7 +34,7 @@ class SettingsProvider with ChangeNotifier {
|
||||
// Not done in constructor as we want to be able to await it
|
||||
Future<void> initializeSettings() async {
|
||||
prefs = await SharedPreferences.getInstance();
|
||||
defaultAppDir = (await getExternalStorageDirectory())!.path;
|
||||
defaultAppDir = (await getAppStorageDir()).path;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user