Skip to content

Commit

Permalink
Fix list element selection in code causing crash
Browse files Browse the repository at this point in the history
  • Loading branch information
david-swift committed May 18, 2024
1 parent 239f025 commit c07b071
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/Adwaita/View/List.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ extension List {
storage.connectSignal(name: "selected_rows_changed", id: Self.selectionField) {
if let binding = storage.fields[Self.selectionField] as? Binding<Element.ID>,
let elements = storage.fields[Self.elementsField] as? [Element],
let id = id(storage, elements) {
let id = id(storage, elements),
binding.wrappedValue != id {
binding.wrappedValue = id
}
}
Expand Down

0 comments on commit c07b071

Please sign in to comment.