1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-02-05 17:47:23 +03:00

fix indexing for tasks visible items

This commit is contained in:
Michail Vourlakos 2021-01-28 21:41:42 +02:00
parent 37470e0555
commit f72a1d75c1
3 changed files with 3 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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();