mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 20:57:36 +02:00
feat: add support for shared patches (#577)
* fix: avoid npe if a patch has empty compatible package. * feat: support for shared patches * fix: incorrect bool check and cleanup Co-authored-by: Aunali321 <aunvakil.aa@gmail.com>
This commit is contained in:
@ -147,7 +147,7 @@ class PatchesSelectorViewModel extends BaseViewModel {
|
||||
|
||||
bool isPatchSupported(Patch patch) {
|
||||
PatchedApplication app = locator<PatcherViewModel>().selectedApp!;
|
||||
return patch.compatiblePackages.any((pack) =>
|
||||
return patch.compatiblePackages.isEmpty || patch.compatiblePackages.any((pack) =>
|
||||
pack.name == app.packageName &&
|
||||
(pack.versions.isEmpty || pack.versions.contains(app.version)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user