fix: set clean selected patches only if not already set

This commit is contained in:
Alberto Ponces 2022-08-31 09:32:56 +01:00
parent 2427b0847d
commit 915a85a2f0

View File

@ -15,11 +15,13 @@ class PatchesSelectorViewModel extends BaseViewModel {
locator<PatcherViewModel>().selectedApp!.packageName, locator<PatcherViewModel>().selectedApp!.packageName,
)); ));
patches.sort((a, b) => a.name.compareTo(b.name)); patches.sort((a, b) => a.name.compareTo(b.name));
if (selectedPatches.isEmpty) {
for (Patch p in patches) { for (Patch p in patches) {
if (!p.excluded) { if (!p.excluded) {
selectedPatches.add(p); selectedPatches.add(p);
} }
} }
}
notifyListeners(); notifyListeners();
} }