Closed diwo closed 4 years ago
Do I understand this PR right? Is this basically a generic ListItem with just the A button directly overriden? Why not use a callback for that on the default list item?
Yeah the new class was unnecessary, I moved the callback into an overloaded constructor on ListItem. I figure 90% of the time when you want to add a list item you'd also want an onclick handler, so it'd make sense to not have to subclass it to override onclick. Also when ListItem onTouch is implemented, it can reuse the same selection handler.
Selectable list item element that is constructed with an action to perform.
Also change ToggleListItem::setState to also affect actual state