From 3568424dfb8794e57656d276964817943cedb385 Mon Sep 17 00:00:00 2001 From: David Proskin Date: Fri, 22 Nov 2024 18:56:23 -0500 Subject: [PATCH] BugFix - Sort Conflicting systems by name in SystemSelectionView --- PVUI/Sources/PVSwiftUI/Imports/SystemSelectionView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PVUI/Sources/PVSwiftUI/Imports/SystemSelectionView.swift b/PVUI/Sources/PVSwiftUI/Imports/SystemSelectionView.swift index 4593d81a5b..71074b7b8f 100644 --- a/PVUI/Sources/PVSwiftUI/Imports/SystemSelectionView.swift +++ b/PVUI/Sources/PVSwiftUI/Imports/SystemSelectionView.swift @@ -13,7 +13,9 @@ struct SystemSelectionView: View { var body: some View { List { - ForEach(item.systems, id: \.self) { system in + ForEach(item.systems.sorted(by: { a, b in + return a.name <= b.name + }), id: \.self) { system in Button(action: { // Set the chosen system and update the status item.userChosenSystem = system