mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-11 13:05:37 +02:00
fix: Handle selecting files and folders for patch options correctly (#1941)
This commit is contained in:
parent
3c36950aeb
commit
b26760b216
3 changed files with 54 additions and 23 deletions
|
@ -38,6 +38,8 @@ class ManagerAPI {
|
|||
bool releaseBuild = false;
|
||||
bool suggestedAppVersionSelected = true;
|
||||
bool isDynamicThemeAvailable = false;
|
||||
bool isScopedStorageAvailable = false;
|
||||
int sdkVersion = 0;
|
||||
String storedPatchesFile = '/selected-patches.json';
|
||||
String keystoreFile =
|
||||
'/sdcard/Android/data/app.revanced.manager.flutter/files/revanced-manager.keystore';
|
||||
|
@ -55,8 +57,13 @@ class ManagerAPI {
|
|||
Future<void> initialize() async {
|
||||
_prefs = await SharedPreferences.getInstance();
|
||||
isRooted = await _rootAPI.isRooted();
|
||||
if (sdkVersion == 0) {
|
||||
sdkVersion = await getSdkVersion();
|
||||
}
|
||||
isDynamicThemeAvailable =
|
||||
(await getSdkVersion()) >= 31; // ANDROID_12_SDK_VERSION = 31
|
||||
sdkVersion >= 31; // ANDROID_12_SDK_VERSION = 31
|
||||
isScopedStorageAvailable =
|
||||
sdkVersion >= 30; // ANDROID_11_SDK_VERSION = 30
|
||||
storedPatchesFile =
|
||||
(await getApplicationDocumentsDirectory()).path + storedPatchesFile;
|
||||
if (kReleaseMode) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue