Skip to content

Commit

Permalink
Update for PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Feb 24, 2021
1 parent e7abddb commit 603ae10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions widget/list.go
Expand Up @@ -333,17 +333,17 @@ func (l *listLayout) offsetUpdated(pos fyne.Position) {
l.updateList()
}

func (l *listLayout) setupListItem(item fyne.CanvasObject, id ListItemID) {
li := item.(*listItem)
func (l *listLayout) setupListItem(li *listItem, id ListItemID) {
previousIndicator := li.selected
li.selected = false
for _, s := range l.list.selected {
if id == s {
li.selected = true
break
}
}
if previousIndicator != li.selected {
item.Refresh()
li.Refresh()
}
if f := l.list.UpdateItem; f != nil {
f(id, li.child)
Expand Down

0 comments on commit 603ae10

Please sign in to comment.