Compare commits

..

9 Commits

Author SHA1 Message Date
ceb9d66f17 chore(release): 1.21.2-dev.1 [skip ci]
## [1.21.2-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.21.1...v1.21.2-dev.1) (2024-08-06)

### Bug Fixes

* Unable to scroll in the removed patches dialog ([#2113](https://github.com/ReVanced/revanced-manager/issues/2113)) ([295c5a7](295c5a74ea))
2024-08-06 00:55:10 +00:00
295c5a74ea fix: Unable to scroll in the removed patches dialog (#2113) 2024-08-06 03:46:01 +03:00
400df69528 chore(release): 1.21.1 [skip ci]
## [1.21.1](https://github.com/ReVanced/revanced-manager/compare/v1.21.0...v1.21.1) (2024-07-29)

### Bug Fixes

* Revert commit b26760b2 to fix file and folder selection ([e707e51](e707e51719))
2024-07-29 20:47:18 +00:00
5bc7b135d5 chore: Merge branch dev to main (#2092) 2024-07-30 02:22:56 +05:45
6dce353d78 chore(release): 1.21.1-dev.1 [skip ci]
## [1.21.1-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.21.0...v1.21.1-dev.1) (2024-07-29)

### Bug Fixes

* Revert commit b26760b2 to fix file and folder selection ([e707e51](e707e51719))
2024-07-29 20:12:35 +00:00
e707e51719 fix: Revert commit b26760b2 to fix file and folder selection 2024-07-29 22:00:25 +02:00
1cea9600a2 chore(release): 1.21.0 [skip ci]
# [1.21.0](https://github.com/ReVanced/revanced-manager/compare/v1.20.1...v1.21.0) (2024-07-29)

### Bug Fixes

* Add missing import to patch options field ([d60f9aa](d60f9aa1d8))
* Adjust scroll from clipping children form fields in `AlertDialog` from `showSourcesDialog` ([#1782](https://github.com/ReVanced/revanced-manager/issues/1782)) ([bbeb836](bbeb836923))
* Cache external API calls  ([#1911](https://github.com/ReVanced/revanced-manager/issues/1911)) ([2c3e2e6](2c3e2e639f))
* Change problematic translation string ([6b03f3a](6b03f3a169))
* Correct architecture to armeabi-v7a ([63c6412](63c6412736))
* Download latest integrations non-pre-release ([4a72267](4a72267d41))
* Follow language update immediately ([#1944](https://github.com/ReVanced/revanced-manager/issues/1944)) ([c13827e](c13827e8e1))
* Follow system theme immediately ([#1942](https://github.com/ReVanced/revanced-manager/issues/1942)) ([694f2a9](694f2a9fae))
* Handle selecting files and folders for patch options correctly ([#1941](https://github.com/ReVanced/revanced-manager/issues/1941)) ([b26760b](b26760b216))
* Increase dashboard RefreshIndicator edge offset ([#1859](https://github.com/ReVanced/revanced-manager/issues/1859)) ([232b702](232b702789))
* Patching Screen draw-behind Navigation Bar ([#1945](https://github.com/ReVanced/revanced-manager/issues/1945)) ([f1b25d0](f1b25d09da))
* Restore consistency with the app ([ea9654e](ea9654edec))
* SecurityException when patching application ([#1856](https://github.com/ReVanced/revanced-manager/issues/1856)) ([e0a6de2](e0a6de2c2b))
* Select previously applied patches when loading patch selection ([#1865](https://github.com/ReVanced/revanced-manager/issues/1865)) ([7ef8f04](7ef8f0454b))
* Unable to install application regardless of preference ([c7627ce](c7627ced8e))
* Unsupported patch toast says "patchItem.unsupportedPatchVersion" ([#2011](https://github.com/ReVanced/revanced-manager/issues/2011)) ([3209c0e](3209c0e430))
* Update dialog shows dev version & loading gets stuck in certain circumstances ([#1792](https://github.com/ReVanced/revanced-manager/issues/1792)) ([fc52560](fc52560244))

### Features

* Add ability to set `null` in patch options ([#1947](https://github.com/ReVanced/revanced-manager/issues/1947)) ([5c68d51](5c68d513a3))
* Include primary architecture in external search ([#2068](https://github.com/ReVanced/revanced-manager/issues/2068)) ([23690a9](23690a98df))
* open browser when clicking on changelog link ([bc300d8](bc300d81d9))
* Save last patched app ([#1414](https://github.com/ReVanced/revanced-manager/issues/1414)) ([7720408](77204087bb))
* Support patching on ARMv7a ([a766352](a7663524e6))
2024-07-29 18:38:53 +00:00
d81808ad7b chore: Merge branch dev to main (#1857) 2024-07-30 01:30:51 +07:00
ea9654edec fix: Restore consistency with the app 2024-07-30 01:30:59 +07:00
5 changed files with 28 additions and 59 deletions

View File

@ -38,8 +38,6 @@ 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';
@ -57,13 +55,8 @@ class ManagerAPI {
Future<void> initialize() async {
_prefs = await SharedPreferences.getInstance();
isRooted = await _rootAPI.isRooted();
if (sdkVersion == 0) {
sdkVersion = await getSdkVersion();
}
isDynamicThemeAvailable =
sdkVersion >= 31; // ANDROID_12_SDK_VERSION = 31
isScopedStorageAvailable =
sdkVersion >= 30; // ANDROID_11_SDK_VERSION = 30
(await getSdkVersion()) >= 31; // ANDROID_12_SDK_VERSION = 31
storedPatchesFile =
(await getApplicationDocumentsDirectory()).path + storedPatchesFile;
if (kReleaseMode) {

View File

@ -55,9 +55,11 @@ class PatcherViewModel extends BaseViewModel {
context: context,
builder: (context) => AlertDialog(
title: Text(t.notice),
content: Text(
t.patcherView.removedPatchesWarningDialogText(
patches: removedPatches.join('\n'),
content: SingleChildScrollView(
child: Text(
t.patcherView.removedPatchesWarningDialogText(
patches: removedPatches.join('\n'),
),
),
),
actions: <Widget>[

View File

@ -147,7 +147,6 @@ class AppInfoViewModel extends BaseViewModel {
context: context,
builder: (context) => AlertDialog(
title: Text(t.appInfoView.removeAppDialogTitle),
backgroundColor: Theme.of(context).colorScheme.secondaryContainer,
content: Text(t.appInfoView.removeAppDialogText),
actions: <Widget>[
TextButton(

View File

@ -1,11 +1,8 @@
import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:revanced_manager/app/app.locator.dart';
import 'package:flutter_file_dialog/flutter_file_dialog.dart';
import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/models/patch.dart';
import 'package:revanced_manager/services/manager_api.dart';
import 'package:revanced_manager/ui/views/patch_options/patch_options_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
@ -401,7 +398,6 @@ class TextFieldForPatchOption extends StatefulWidget {
}
class _TextFieldForPatchOptionState extends State<TextFieldForPatchOption> {
final ManagerAPI _managerAPI = locator<ManagerAPI>();
final TextEditingController controller = TextEditingController();
String? selectedKey;
String? defaultValue;
@ -528,49 +524,29 @@ class _TextFieldForPatchOptionState extends State<TextFieldForPatchOption> {
];
},
onSelected: (String selection) async {
// manageExternalStorage permission is required for file/folder selection
// otherwise, the app will not complain, but the patches will error out
// the same way as if the user selected an empty file/folder.
// Android 11 and above requires the manageExternalStorage permission
final Map<String, dynamic> availableActions = {
t.patchOptionsView.selectFilePath: () async {
if (_managerAPI.isScopedStorageAvailable) {
final permission =
await Permission.manageExternalStorage.request();
if (!permission.isGranted) {
return;
}
switch (selection) {
case 'file':
final String? result = await FlutterFileDialog.pickFile();
if (result != null) {
controller.text = result;
widget.onChanged(controller.text);
}
final FilePickerResult? result =
await FilePicker.platform.pickFiles();
if (result == null) {
return;
break;
case 'folder':
final DirectoryLocation? result =
await FlutterFileDialog.pickDirectory();
if (result != null) {
controller.text = result.toString();
widget.onChanged(controller.text);
}
controller.text = result.files.single.path!;
widget.onChanged(controller.text);
},
t.patchOptionsView.selectFolder: () async {
if (_managerAPI.isScopedStorageAvailable) {
final permission =
await Permission.manageExternalStorage.request();
if (!permission.isGranted) {
return;
}
}
final String? result =
await FilePicker.platform.getDirectoryPath();
if (result == null) {
return;
}
controller.text = result;
widget.onChanged(controller.text);
},
t.remove: () {
break;
case 'remove':
widget.removeValue!();
},
};
if (availableActions.containsKey(selection)) {
await availableActions[selection]!();
break;
case 'null':
controller.text = '';
widget.onChanged(null);
break;
}
},
),

View File

@ -4,7 +4,7 @@ homepage: https://github.com/ReVanced/revanced-manager
publish_to: 'none'
version: 1.21.0-dev.9+101800025
version: 1.21.2-dev.1+101800029
environment:
sdk: '>=3.0.0 <4.0.0'
@ -23,7 +23,6 @@ dependencies:
dynamic_color: ^1.7.0
dynamic_themes: ^1.1.0
expandable: ^5.0.1
file_picker: ^8.0.3
flutter:
sdk: flutter
flutter_background: