Skip to content

Commit

Permalink
Fixes file selection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNightmanCodeth committed Apr 1, 2022
1 parent 34f087c commit 6380a75
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Mission/Views/FileSelectDialog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ struct FileSelectDialog: View {
ForEach(Array(store.addTransferFilesList.enumerated()), id: \.offset) { (i,f) in
MultipleSelectionRow(title: f.name, isSelected: self.selections.contains(i)) {
if self.selections.contains(i) {
self.selections.removeAll(where: { $0 == i })
} else {
print("remove \(i)")
self.selections.append(i)
} else {
print("add \(i)")
self.selections.removeAll(where: { $0 == i })
}
}
}
Expand Down

0 comments on commit 6380a75

Please sign in to comment.