mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 04:37:37 +02:00
feat: use provided patches.json to load patches
This commit is contained in:
@ -57,7 +57,7 @@ class _PatchesSelectorViewState extends State<PatchesSelectorView> {
|
||||
.getQueriedPatches(_query)
|
||||
.map((patch) => PatchItem(
|
||||
name: patch.name,
|
||||
simpleName: patch.simpleName,
|
||||
simpleName: patch.getSimpleName(),
|
||||
version: patch.version,
|
||||
description: patch.description,
|
||||
isSelected: model.isSelected(patch),
|
||||
|
@ -12,11 +12,11 @@ class PatchesSelectorViewModel extends BaseViewModel {
|
||||
|
||||
Future<void> initialize() async {
|
||||
patches.addAll(await _patcherAPI.getFilteredPatches(
|
||||
locator<PatcherViewModel>().selectedApp,
|
||||
locator<PatcherViewModel>().selectedApp!.packageName,
|
||||
));
|
||||
patches.sort((a, b) => a.simpleName.compareTo(b.simpleName));
|
||||
patches.sort((a, b) => a.name.compareTo(b.name));
|
||||
for (Patch p in patches) {
|
||||
if (p.include) {
|
||||
if (!p.excluded) {
|
||||
selectedPatches.add(p);
|
||||
}
|
||||
}
|
||||
@ -56,7 +56,7 @@ class PatchesSelectorViewModel extends BaseViewModel {
|
||||
.where((patch) =>
|
||||
query.isEmpty ||
|
||||
query.length < 2 ||
|
||||
patch.simpleName.toLowerCase().contains(
|
||||
patch.name.toLowerCase().contains(
|
||||
query.toLowerCase(),
|
||||
))
|
||||
.toList();
|
||||
|
Reference in New Issue
Block a user