mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 04:37:37 +02:00
feat: ability to store and load selected patches (#469)
* feat: ability to store and load selected patches * fix: I18n * fix: do not append but truncate file * fix: use json file, minor fixes * fix: better ui * WIP * feat: load patches selection after app selection * feat: import/export json file * fix: reformat code * fix: rare bug on import feature fixed * fix: move export/ipmort to settings page & import full json * fix: minor improvements * fix: minor code quality improvements * fix: export filename fix * fix: select list element istead of removing it
This commit is contained in:
@ -107,4 +107,15 @@ class PatcherViewModel extends BaseViewModel {
|
||||
'appSelectorCard.recommendedVersion',
|
||||
)}: $recommendedVersion';
|
||||
}
|
||||
|
||||
Future<void> loadLastSelectedPatches() async {
|
||||
this.selectedPatches.clear();
|
||||
List<String> selectedPatches =
|
||||
await _managerAPI.getSelectedPatches(selectedApp!.originalPackageName);
|
||||
List<Patch> patches =
|
||||
await _patcherAPI.getFilteredPatches(selectedApp!.originalPackageName);
|
||||
this.selectedPatches
|
||||
.addAll(patches.where((patch) => selectedPatches.contains(patch.name)));
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user