fix: selected patches order (#1345)

This commit is contained in:
MD Danish Ansari 2023-10-10 17:24:42 +05:30 committed by GitHub
parent 377368f6bf
commit 2abadc73e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,9 @@ class PatchSelectorCard extends StatelessWidget {
String _getPatchesSelection() {
String text = '';
for (final Patch p in locator<PatcherViewModel>().selectedPatches) {
final List<Patch> selectedPatches = locator<PatcherViewModel>().selectedPatches;
selectedPatches.sort((a, b) => a.name.compareTo(b.name));
for (final Patch p in selectedPatches) {
text += '\u2022 ${p.getSimpleName()}\n';
}
return text.substring(0, text.length - 1);