mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-17 22:46:27 +08:00
Compare commits
3 Commits
v1.24.1-de
...
fix/requir
Author | SHA1 | Date | |
---|---|---|---|
a92deba685 | |||
8182228a46 | |||
7fa5daf623 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -43,6 +43,7 @@ app.*.map.json
|
||||
/android/app/release
|
||||
|
||||
# Generated files
|
||||
android/app/.cxx
|
||||
**/*.g.dart
|
||||
**/*.locator.dart
|
||||
**/*.router.dart
|
||||
|
3
devtools_options.yaml
Normal file
3
devtools_options.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
description: This file stores settings for Dart & Flutter DevTools.
|
||||
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
|
||||
extensions:
|
@ -1,3 +1,4 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:revanced_manager/app/app.locator.dart';
|
||||
import 'package:revanced_manager/models/patch.dart';
|
||||
import 'package:revanced_manager/models/patched_application.dart';
|
||||
@ -17,12 +18,12 @@ bool isPatchSupported(Patch patch) {
|
||||
bool hasUnsupportedRequiredOption(List<Option> options, Patch patch) {
|
||||
final List<String> requiredOptionsType = [];
|
||||
final List<String> supportedOptionsType = [
|
||||
'String',
|
||||
'Boolean',
|
||||
'Int',
|
||||
'StringArray',
|
||||
'IntArray',
|
||||
'LongArray',
|
||||
'kotlin.String',
|
||||
'kotlin.Int',
|
||||
'kotlin.Boolean',
|
||||
'kotlin.StringArray',
|
||||
'kotlin.IntArray',
|
||||
'kotlin.LongArray',
|
||||
];
|
||||
for (final Option option in options) {
|
||||
if (option.required &&
|
||||
@ -38,6 +39,9 @@ bool hasUnsupportedRequiredOption(List<Option> options, Patch patch) {
|
||||
}
|
||||
for (final String optionType in requiredOptionsType) {
|
||||
if (!supportedOptionsType.contains(optionType)) {
|
||||
if (kDebugMode) {
|
||||
print('${patch.name} has unsupported required patch option: $requiredOptionsType');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user