mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-24 11:41:01 +00:00
fix(patch-item): hide universal patches if not enabled (#1087)
This commit is contained in:
@@ -81,7 +81,7 @@ class PatchesSelectorViewModel extends BaseViewModel {
|
||||
}
|
||||
|
||||
List<Patch> getQueriedPatches(String query) {
|
||||
return patches
|
||||
final List<Patch> patch = patches
|
||||
.where(
|
||||
(patch) =>
|
||||
query.isEmpty ||
|
||||
@@ -90,6 +90,13 @@ class PatchesSelectorViewModel extends BaseViewModel {
|
||||
patch.getSimpleName().toLowerCase().contains(query.toLowerCase()),
|
||||
)
|
||||
.toList();
|
||||
if (_managerAPI.areUniversalPatchesEnabled()) {
|
||||
return patch;
|
||||
} else {
|
||||
return patch
|
||||
.where((patch) => patch.compatiblePackages.isNotEmpty)
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
||||
String getAppVersion() {
|
||||
|
||||
Reference in New Issue
Block a user