Use isCurrentItem property to know when an item is selected.

Replace listIndex and itemIndex properties by ListView.isCurrentItem.