fix: Use original packageName to get compatible patches

This commit is contained in:
Alberto Ponces 2022-09-20 10:04:02 +01:00
parent fd099fb632
commit 4631982d42

View File

@ -70,10 +70,14 @@ class PatcherAPI {
}
Future<List<Patch>> getFilteredPatches(String packageName) async {
String newPackageName = packageName.replaceFirst(
'app.revanced.',
'com.google.',
);
return _patches
.where((patch) =>
!patch.name.contains('settings') &&
patch.compatiblePackages.any((pack) => pack.name == packageName))
patch.compatiblePackages.any((pack) => pack.name == newPackageName))
.toList();
}