File tree Expand file tree Collapse file tree
TablePro/Views/Connection Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ struct WelcomeWindowView: View {
3131 @State private var connectionToEdit : DatabaseConnection ?
3232 @State private var connectionsToDelete : [ DatabaseConnection ] = [ ]
3333 @State private var showDeleteConfirmation = false
34- @State private var hoveredConnectionId : UUID ?
3534 @State private var selectedConnectionIds : Set < UUID > = [ ]
3635 @FocusState private var focus : FocusField ?
3736 @State private var showOnboarding = !AppSettingsStorage. shared. hasCompletedOnboarding ( )
@@ -946,13 +945,13 @@ struct WelcomeWindowView: View {
946945
947946 private func moveGroups( from source: IndexSet , to destination: Int ) {
948947 let active = activeGroups
949- guard source. allSatisfy ( { $0 < active. count } ) ,
950- destination <= active. count else { return }
951-
952948 let activeGroupIndices = active. compactMap { activeGroup in
953949 groups. firstIndex ( where: { $0. id == activeGroup. id } )
954950 }
955951
952+ guard source. allSatisfy ( { $0 < activeGroupIndices. count } ) ,
953+ destination <= activeGroupIndices. count else { return }
954+
956955 let globalSource = IndexSet ( source. map { activeGroupIndices [ $0] } )
957956 let globalDestination : Int
958957 if destination < activeGroupIndices. count {
You can’t perform that action at this time.
0 commit comments