Compare commits

...

14 Commits

Author SHA1 Message Date
validcube
ba932758c8 build: bump version to v1.14.0 2023-10-21 23:00:51 +07:00
Pun Butrach
ee43fa6311 chore: merge dev to main (#1399) 2023-10-21 22:58:58 +07:00
Pun Butrach
ad6b164d51 feat: root status in export patch log (#1407)
Co-authored-by: Ushie <ushiekane@gmail.com>
2023-10-21 17:46:51 +07:00
validcube
4a5510acb2 refactor: remove the remaining of semantic release
Removal reason: not maintained
2023-10-21 15:37:23 +07:00
validcube
970dbc4428 refactor(social): use correct github organisation name
the correct name is "ReVanced" not "revanced", we changed for a while now.
2023-10-21 15:33:36 +07:00
validcube
f8f37325eb refactor(social): change Twitter to X 2023-10-21 15:32:13 +07:00
Benjamin
bb999019ef feat: show patch options in error log (#1394) 2023-10-17 13:21:59 +07:00
KobeW50
533b6a155a feat: clarify "Version compatibility check" description (#1397) 2023-10-17 13:20:46 +07:00
KobeW50
4cdc92388c refactor: fix patch log order to be consistent with settings order (#1398) 2023-10-17 13:19:18 +07:00
Pun Butrach
ccc6be1e71 refactor(accessibility): improve patch options (#1369)
Co-authored-by: Palm <palmpasuthorn@gmail.com>
2023-10-16 16:47:59 +07:00
Ushie
b355778a92 chore: merge dev to main (#1388) 2023-10-15 20:19:54 +03:00
Ushie
6a12e8f37a build: bump version to v1.13.1 2023-10-15 20:19:23 +03:00
Ushie
59adb91f5f fix(settings): inverted version compatibility switch 2023-10-15 20:16:58 +03:00
KobeW50
53677e2f39 fix: typo in reset patch selection dialog (#1387) 2023-10-15 20:14:19 +03:00
14 changed files with 54 additions and 7305 deletions

View File

@@ -1,75 +0,0 @@
{
"branches": [
"main",
{
"name": "dev",
"prerelease": true
}
],
"plugins": [
"semantic-release-export-data",
"@semantic-release/commit-analyzer",
[
"@semantic-release/release-notes-generator",
{
"presetConfig": {
"types": [
{
"type": "build",
"section": "Dependency Updates"
},
{
"type": "chore",
"section": "Other Changes",
"hidden": false
},
{
"type": "perf",
"section": "Performance Improvements",
"hidden": false
},
{
"type": "refactor",
"section": "Code Improvements",
"hidden": false
}
]
}
}
],
"@semantic-release/changelog",
"semantic-release-flutter-plugin",
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md",
"pubspec.yaml"
]
}
],
[
"@semantic-release/github",
{
"assets": [
{
"path": "build/app/outputs/apk/release/revanced-manager-*.apk"
}
],
"successComment": false
}
],
[
"@saithodev/semantic-release-backmerge",
{
"backmergeBranches": [
{
"from": "main",
"to": "dev"
}
],
"clearWorkspace": true
}
]
]
}

View File

@@ -1 +0,0 @@

View File

@@ -1,6 +1,7 @@
{ {
"okButton": "OK", "okButton": "OK",
"cancelButton": "Cancel", "cancelButton": "Cancel",
"dismissButton": "Dismiss",
"quitButton": "Quit", "quitButton": "Quit",
"updateButton": "Update", "updateButton": "Update",
"enabledLabel": "Enabled", "enabledLabel": "Enabled",
@@ -134,6 +135,7 @@
"setRequiredOption": "Some patches require options to be set:\n\n{patches}\n\nPlease set them before continuing." "setRequiredOption": "Some patches require options to be set:\n\n{patches}\n\nPlease set them before continuing."
}, },
"patchOptionsView": { "patchOptionsView": {
"resetOptionsTooltip": "Reset patch options",
"viewTitle": "Patch options", "viewTitle": "Patch options",
"saveOptions": "Save", "saveOptions": "Save",
@@ -232,7 +234,7 @@
"universalPatchesLabel": "Show universal patches", "universalPatchesLabel": "Show universal patches",
"universalPatchesHint": "Display all apps and universal patches (may slow down the app list)", "universalPatchesHint": "Display all apps and universal patches (may slow down the app list)",
"versionCompatibilityCheckLabel": "Version compatibility check", "versionCompatibilityCheckLabel": "Version compatibility check",
"versionCompatibilityCheckHint": "Restricts patches to supported versions", "versionCompatibilityCheckHint": "Restricts patches to supported app versions",
"aboutLabel": "About", "aboutLabel": "About",
"snackbarMessage": "Copied to clipboard", "snackbarMessage": "Copied to clipboard",
@@ -254,7 +256,7 @@
"resetStoredPatchesLabel": "Reset patch selection", "resetStoredPatchesLabel": "Reset patch selection",
"resetStoredPatchesHint": "Reset the stored patch selection", "resetStoredPatchesHint": "Reset the stored patch selection",
"resetStoredPatchesDialogTitle": "Reset patch selection?", "resetStoredPatchesDialogTitle": "Reset patch selection?",
"resetStoredPatchesDialogText": "The default selection of patches will be restored..", "resetStoredPatchesDialogText": "The default selection of patches will be restored.",
"resetStoredPatches": "Patch selection has been reset", "resetStoredPatches": "Patch selection has been reset",
"resetStoredOptionsLabel": "Reset patch options", "resetStoredOptionsLabel": "Reset patch options",

View File

@@ -677,7 +677,7 @@ class ManagerAPI {
Future<List<String>> getDefaultPatches() async { Future<List<String>> getDefaultPatches() async {
final List<Patch> patches = await getPatches(); final List<Patch> patches = await getPatches();
final List<String> defaultPatches = []; final List<String> defaultPatches = [];
if (isVersionCompatibilityCheckEnabled() == false) { if (isVersionCompatibilityCheckEnabled() == true) {
defaultPatches.addAll( defaultPatches.addAll(
patches patches
.where( .where(

View File

@@ -139,7 +139,6 @@ class InstallerViewModel extends BaseViewModel {
} }
Future<void> runPatcher() async { Future<void> runPatcher() async {
try { try {
await _patcherAPI.runPatcher( await _patcherAPI.runPatcher(
_app.packageName, _app.packageName,
@@ -159,7 +158,7 @@ class InstallerViewModel extends BaseViewModel {
// Necessary to reset the state of patches so that they // Necessary to reset the state of patches so that they
// can be reloaded again. // can be reloaded again.
_managerAPI.patches.clear(); _managerAPI.patches.clear();
await _patcherAPI.loadPatches(); await _patcherAPI.loadPatches();
try { try {
@@ -185,26 +184,27 @@ class InstallerViewModel extends BaseViewModel {
final formattedLogs = [ final formattedLogs = [
'```', '```',
'~ Device Info', '- Device Info',
'ReVanced Manager: ${info['version']}', 'ReVanced Manager: ${info['version']}',
'Build: ${info['flavor']}', 'Build: ${info['flavor']}',
'Model: ${info['model']}', 'Model: ${info['model']}',
'Android version: ${info['androidVersion']}', 'Android version: ${info['androidVersion']}',
'Supported architectures: ${info['supportedArch'].join(", ")}', 'Supported architectures: ${info['supportedArch'].join(", ")}',
'Root permissions: ${isRooted ? 'Yes' : 'No'}',
'\n~ Patch Info',
'\n- Patch Info',
'App: ${_app.packageName} v${_app.version}', 'App: ${_app.packageName} v${_app.version}',
'Patches version: ${_managerAPI.patchesVersion}', 'Patches version: ${_managerAPI.patchesVersion}',
'Patches: ${_patches.map((p) => p.name).toList().join(", ")}', 'Patches: ${_patches.map((p) => p.name + (p.options.isEmpty ? '' : ' [${p.options.map((o) => '${o.title}: ${o.value}').join(", ")}]')).toList().join(", ")}',
'\n~ Settings', '\n- Settings',
'Allow changing patch selection: ${_managerAPI.isPatchesChangeEnabled()}', 'Allow changing patch selection: ${_managerAPI.isPatchesChangeEnabled()}',
'Show universal patches: ${_managerAPI.areUniversalPatchesEnabled()}',
'Version compatibility check: ${_managerAPI.isVersionCompatibilityCheckEnabled()}', 'Version compatibility check: ${_managerAPI.isVersionCompatibilityCheckEnabled()}',
'Show universal patches: ${_managerAPI.areUniversalPatchesEnabled()}',
'Patches source: ${_managerAPI.getPatchesRepo()}', 'Patches source: ${_managerAPI.getPatchesRepo()}',
'Integration source: ${_managerAPI.getIntegrationsRepo()}', 'Integration source: ${_managerAPI.getIntegrationsRepo()}',
'\n~ Logs', '\n- Logs',
logs, logs,
'```', '```',
]; ];

View File

@@ -48,6 +48,10 @@ class PatchOptionsView extends StatelessWidget {
icon: const Icon( icon: const Icon(
Icons.history, Icons.history,
), ),
tooltip: FlutterI18n.translate(
context,
'patchOptionsView.resetOptionsTooltip',
),
), ),
], ],
), ),

View File

@@ -147,7 +147,7 @@ class PatchOptionsViewModel extends BaseViewModel {
), ),
actions: [ actions: [
CustomMaterialButton( CustomMaterialButton(
label: I18nText('okButton'), label: I18nText('cancelButton'),
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
@@ -165,7 +165,7 @@ class PatchOptionsViewModel extends BaseViewModel {
.map((e) { .map((e) {
return CustomCard( return CustomCard(
padding: const EdgeInsets.all(4), padding: const EdgeInsets.all(4),
backgroundColor: Theme.of(context).colorScheme.secondaryContainer, backgroundColor: Theme.of(context).colorScheme.surface,
onTap: () { onTap: () {
addOption(e); addOption(e);
Navigator.pop(context); Navigator.pop(context);
@@ -186,9 +186,9 @@ class PatchOptionsViewModel extends BaseViewModel {
e.description, e.description,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Theme.of(context).colorScheme.onSecondaryContainer, color: Theme.of(context).colorScheme.onSurface,
), ),
) ),
], ],
), ),
), ),

View File

@@ -80,7 +80,8 @@ class PatcherViewModel extends BaseViewModel {
} }
bool checkRequiredPatchOption(BuildContext context) { bool checkRequiredPatchOption(BuildContext context) {
if (getNullRequiredOptions(selectedPatches, selectedApp!.packageName).isNotEmpty) { if (getNullRequiredOptions(selectedPatches, selectedApp!.packageName)
.isNotEmpty) {
showRequiredOptionDialog(context); showRequiredOptionDialog(context);
return false; return false;
} }
@@ -190,7 +191,7 @@ class PatcherViewModel extends BaseViewModel {
this.selectedPatches.clear(); this.selectedPatches.clear();
this.selectedPatches.addAll(patches.where((patch) => !patch.excluded)); this.selectedPatches.addAll(patches.where((patch) => !patch.excluded));
} }
if (!_managerAPI.isVersionCompatibilityCheckEnabled()) { if (_managerAPI.isVersionCompatibilityCheckEnabled()) {
this.selectedPatches.removeWhere((patch) => !isPatchSupported(patch)); this.selectedPatches.removeWhere((patch) => !isPatchSupported(patch));
} }
if (!_managerAPI.areUniversalPatchesEnabled()) { if (!_managerAPI.areUniversalPatchesEnabled()) {
@@ -199,11 +200,12 @@ class PatcherViewModel extends BaseViewModel {
.removeWhere((patch) => patch.compatiblePackages.isEmpty); .removeWhere((patch) => patch.compatiblePackages.isEmpty);
} }
final usedPatches = _managerAPI.getUsedPatches(selectedApp!.packageName); final usedPatches = _managerAPI.getUsedPatches(selectedApp!.packageName);
for (final patch in usedPatches){ for (final patch in usedPatches) {
if (!patches.any((p) => p.name == patch.name)){ if (!patches.any((p) => p.name == patch.name)) {
removedPatches.add('${patch.name}'); removedPatches.add('${patch.name}');
for (final option in patch.options) { for (final option in patch.options) {
_managerAPI.clearPatchOption(selectedApp!.packageName, patch.name, option.key); _managerAPI.clearPatchOption(
selectedApp!.packageName, patch.name, option.key);
} }
} }
} }

View File

@@ -169,7 +169,7 @@ class PatchesSelectorViewModel extends BaseViewModel {
.where( .where(
(element) => (element) =>
!element.excluded && !element.excluded &&
(_managerAPI.isVersionCompatibilityCheckEnabled() || (!_managerAPI.isVersionCompatibilityCheckEnabled() ||
isPatchSupported(element)), isPatchSupported(element)),
), ),
); );
@@ -209,7 +209,10 @@ class PatchesSelectorViewModel extends BaseViewModel {
query.isEmpty || query.isEmpty ||
query.length < 2 || query.length < 2 ||
patch.name.toLowerCase().contains(query.toLowerCase()) || patch.name.toLowerCase().contains(query.toLowerCase()) ||
patch.name.replaceAll(RegExp(r'[^\w\s]+'), '').toLowerCase().contains(query.toLowerCase()), patch.name
.replaceAll(RegExp(r'[^\w\s]+'), '')
.toLowerCase()
.contains(query.toLowerCase()),
) )
.toList(); .toList();
if (_managerAPI.areUniversalPatchesEnabled()) { if (_managerAPI.areUniversalPatchesEnabled()) {
@@ -281,7 +284,7 @@ class PatchesSelectorViewModel extends BaseViewModel {
this.selectedPatches.addAll( this.selectedPatches.addAll(
patches.where((patch) => selectedPatches.contains(patch.name)), patches.where((patch) => selectedPatches.contains(patch.name)),
); );
if (!_managerAPI.isVersionCompatibilityCheckEnabled()) { if (_managerAPI.isVersionCompatibilityCheckEnabled()) {
this.selectedPatches.removeWhere((patch) => !isPatchSupported(patch)); this.selectedPatches.removeWhere((patch) => !isPatchSupported(patch));
} }
} else { } else {

View File

@@ -48,12 +48,13 @@ class _PatchItemState extends State<PatchItem> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
widget.isSelected = widget.isSelected && widget.isSelected = widget.isSelected &&
(!widget.isUnsupported || (!widget.isUnsupported ||
widget._managerAPI.isVersionCompatibilityCheckEnabled()) && !widget.hasUnsupportedPatchOption; !widget._managerAPI.isVersionCompatibilityCheckEnabled()) &&
!widget.hasUnsupportedPatchOption;
return Padding( return Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0), padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Opacity( child: Opacity(
opacity: widget.isUnsupported && opacity: widget.isUnsupported &&
widget._managerAPI.isVersionCompatibilityCheckEnabled() == false widget._managerAPI.isVersionCompatibilityCheckEnabled() == true
? 0.5 ? 0.5
: 1, : 1,
child: CustomCard( child: CustomCard(
@@ -65,7 +66,7 @@ class _PatchItemState extends State<PatchItem> {
), ),
onTap: () { onTap: () {
if (widget.isUnsupported && if (widget.isUnsupported &&
!widget._managerAPI.isVersionCompatibilityCheckEnabled()) { widget._managerAPI.isVersionCompatibilityCheckEnabled()) {
widget.isSelected = false; widget.isSelected = false;
widget.toast.showBottom('patchItem.unsupportedPatchVersion'); widget.toast.showBottom('patchItem.unsupportedPatchVersion');
} else if (widget.isChangeEnabled) { } else if (widget.isChangeEnabled) {
@@ -79,7 +80,7 @@ class _PatchItemState extends State<PatchItem> {
setState(() {}); setState(() {});
} }
if (!widget.isUnsupported || if (!widget.isUnsupported ||
widget._managerAPI.isVersionCompatibilityCheckEnabled()) { !widget._managerAPI.isVersionCompatibilityCheckEnabled()) {
widget.onChanged(widget.isSelected); widget.onChanged(widget.isSelected);
} }
}, },
@@ -98,7 +99,8 @@ class _PatchItemState extends State<PatchItem> {
), ),
onChanged: (newValue) { onChanged: (newValue) {
if (widget.isUnsupported && if (widget.isUnsupported &&
!widget._managerAPI.isVersionCompatibilityCheckEnabled()) { widget._managerAPI
.isVersionCompatibilityCheckEnabled()) {
widget.isSelected = false; widget.isSelected = false;
widget.toast.showBottom( widget.toast.showBottom(
'patchItem.unsupportedPatchVersion', 'patchItem.unsupportedPatchVersion',
@@ -114,7 +116,8 @@ class _PatchItemState extends State<PatchItem> {
setState(() {}); setState(() {});
} }
if (!widget.isUnsupported || if (!widget.isUnsupported ||
widget._managerAPI.isVersionCompatibilityCheckEnabled()) { !widget._managerAPI
.isVersionCompatibilityCheckEnabled()) {
widget.onChanged(widget.isSelected); widget.onChanged(widget.isSelected);
} }
}, },
@@ -154,7 +157,7 @@ class _PatchItemState extends State<PatchItem> {
runSpacing: 4, runSpacing: 4,
children: [ children: [
if (widget.isUnsupported && if (widget.isUnsupported &&
widget._managerAPI !widget._managerAPI
.isVersionCompatibilityCheckEnabled()) .isVersionCompatibilityCheckEnabled())
Padding( Padding(
padding: const EdgeInsets.only(top: 8), padding: const EdgeInsets.only(top: 8),

View File

@@ -52,8 +52,8 @@ class SocialMediaWidget extends StatelessWidget {
SocialMediaItem( SocialMediaItem(
icon: FaIcon(FontAwesomeIcons.github), icon: FaIcon(FontAwesomeIcons.github),
title: Text('GitHub'), title: Text('GitHub'),
subtitle: Text('github.com/revanced'), subtitle: Text('github.com/ReVanced'),
url: 'https://github.com/revanced', url: 'https://github.com/ReVanced',
), ),
SocialMediaItem( SocialMediaItem(
icon: FaIcon(FontAwesomeIcons.discord), icon: FaIcon(FontAwesomeIcons.discord),
@@ -74,10 +74,10 @@ class SocialMediaWidget extends StatelessWidget {
url: 'https://reddit.com/r/revancedapp', url: 'https://reddit.com/r/revancedapp',
), ),
SocialMediaItem( SocialMediaItem(
icon: FaIcon(FontAwesomeIcons.twitter), icon: FaIcon(FontAwesomeIcons.xTwitter),
title: Text('Twitter'), title: Text('X'),
subtitle: Text('@revancedapp'), subtitle: Text('@revancedapp'),
url: 'https://twitter.com/revancedapp', url: 'https://x.com/revancedapp',
), ),
SocialMediaItem( SocialMediaItem(
icon: FaIcon(FontAwesomeIcons.youtube), icon: FaIcon(FontAwesomeIcons.youtube),

7179
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +0,0 @@
{
"devDependencies": {
"@saithodev/semantic-release-backmerge": "^3.1.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"semantic-release": "^21.0.1",
"semantic-release-export-data": "^1.0.1",
"semantic-release-flutter-plugin": "^1.1.2"
}
}

View File

@@ -4,7 +4,7 @@ homepage: https://github.com/revanced/revanced-manager
publish_to: 'none' publish_to: 'none'
version: 1.13.0+101300000 version: 1.14.0+101400000
environment: environment:
sdk: '>=3.0.0 <4.0.0' sdk: '>=3.0.0 <4.0.0'
@@ -41,7 +41,7 @@ dependencies:
sdk: flutter sdk: flutter
flutter_svg: ^2.0.4 flutter_svg: ^2.0.4
fluttertoast: ^8.2.1 fluttertoast: ^8.2.1
font_awesome_flutter: ^10.4.0 font_awesome_flutter: ^10.6.0
get_it: 7.2.0 get_it: 7.2.0
google_fonts: ^4.0.3 google_fonts: ^4.0.3
http: ^0.13.5 http: ^0.13.5