What is going on in applet -> listitem's customExpandedViewContent
I am so ever confused by these lines…
customExpandedViewContent: Component {
id: expandedView
// ...
}
// Hide device details when the device for this delegate changes
// This happens eg. when device connects/disconnects
property QtObject __dev
readonly property QtObject dev : Device
onDevChanged: {
if (__dev === dev) {
return;
}
__dev = dev;
if (expandedView.status === Component.Ready) {
expandableListItem.collapse();
expandableListItem.ListView.view.currentIndex = -1;
}
}
What does Component's status has to do with anything? And unconditionally resetting currentIndex
is probably too much in case a user has been interacting with some other list item (device) at this time.