Compare commits

...

2 Commits

Author SHA1 Message Date
aAbed
5b02f47cb5
Merge a5c9548b4d into aab5d4411b 2024-04-24 03:04:37 +02:00
aAbed
a5c9548b4d
fix: Previously applied patches not selected when loading patch selection 2024-04-13 09:27:37 +05:45

View File

@ -302,9 +302,16 @@ class PatchesSelectorViewModel extends BaseViewModel {
Future<void> loadSelectedPatches(BuildContext context) async {
if (_managerAPI.isPatchesChangeEnabled()) {
final List<String> selectedPatches = await _managerAPI.getSelectedPatches(
locator<PatcherViewModel>().selectedApp!.packageName,
);
final List<String>? appliedPatches = _managerAPI
.getPatchedApps()
.firstWhereOrNull(
(app) => app.packageName == selectedApp!.packageName,
)
?.appliedPatches;
final List<String> selectedPatches = appliedPatches ??
await _managerAPI.getSelectedPatches(
selectedApp!.packageName,
);
if (selectedPatches.isNotEmpty) {
this.selectedPatches.clear();
this.selectedPatches.addAll(