Carousel fastScrolling is now disabled if there are less than three entries.

This commit is contained in:
Leon Styhre 2023-03-05 17:37:24 +01:00
parent e94235ec63
commit e96cbc52f9

View file

@ -292,7 +292,10 @@ protected:
while (mScrollTier < mTierList.count - 1 &&
mScrollTierAccumulator >= mTierList.tiers[mScrollTier].length) {
mScrollTierAccumulator -= mTierList.tiers[mScrollTier].length;
++mScrollTier;
// This is required for the carousel as the highest tier introduces weird behavior
// if there are only two entries.
if (!(mScrollTier > 0 && mEntries.size() < 3))
++mScrollTier;
}
// Actually perform the scrolling.