[Notifications KCM] Fixup current item syncing logic
ClosedPublic

Authored by broulik on Jan 4 2020, 11:30 PM.

Details

Summary

Instead of relying on currentIndex and some massively complicated logic to track when the index didn't change but the item behind that index, just use currentItem.
The updateCurrentIndex being called during model changes massively confused ListView leading to inconsistent view state.

BUG: 410842
FIXED-IN: 5.18.0

Test Plan
  • Selecting apps by clicking and arrow keys still works
  • Filtering keeps the view on the right in sync with whatever happens to be selected in the list on the left
  • I didn't notice any broken or missing entries in the list anymore

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Jan 4 2020, 11:30 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 4 2020, 11:30 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Jan 4 2020, 11:30 PM
mart accepted this revision.Jan 7 2020, 10:02 AM
This revision is now accepted and ready to land.Jan 7 2020, 10:02 AM
This revision was automatically updated to reflect the committed changes.