fix indexing for tasks visible items

work/spdx
Michail Vourlakos 4 years ago
parent 37470e0555
commit f72a1d75c1

@ -29,12 +29,11 @@ AbilityClient.Indexer {
property Item layout: null
property bool updateIsBlocked: false
property int itemsCount: 0 /*is needed to be set from consumer developer in order to avoid binding loops warnings*/
readonly property bool tailAppletIsSeparator: isActive ? bridge.indexer.tailAppletIsSeparator : false
readonly property bool headAppletIsSeparator: isActive ? bridge.indexer.headAppletIsSeparator : false
readonly property bool isReady: (layout && layout.children.length === itemsCount) && !updateIsBlocked
readonly property bool isReady: !updateIsBlocked
readonly property int maxIndex: 99999
readonly property alias visibleItemsCount: _privates.visibleItemsCount

@ -702,7 +702,6 @@ Item {
layout: icList.contentItem
tasksModel: tasksModel
indexer.itemsCount: tasksModel.count
indexer.updateIsBlocked: root.inDraggingPhase || root.inActivityChange
indicators.local.isEnabled: !plasmoid.configuration.isInLatteDock

@ -30,7 +30,8 @@ Loader{
visible: badgeString !== ""
property int fixedIndex:-1
property string badgeString: (shorcutBadge.fixedIndex>=1 && shorcutBadge.fixedIndex<20 && taskItem.abilities.shortcuts.badges.length===19) ?
readonly property int maxFixedIndex: taskItem.abilities.shortcuts.badges.length
property string badgeString: (shorcutBadge.fixedIndex>=1 && shorcutBadge.fixedIndex<=maxFixedIndex) ?
taskItem.abilities.shortcuts.badges[shorcutBadge.fixedIndex-1] : ""
onActiveChanged: updateShorcutIndex();

Loading…
Cancel
Save