From 69c14235fc75fd1337b4359a71e477501d7419df Mon Sep 17 00:00:00 2001 From: zcdqs Date: Mon, 4 Nov 2024 19:08:35 +0800 Subject: [PATCH] make fill current line of cached item same with non-cached Signed-off-by: zcdqs Change-Id: Ieafb7e0d10ec8a3b3519ca010d1378c1b84b2ffe --- .../pattern/grid/grid_scroll/grid_scroll_layout_algorithm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/core/components_ng/pattern/grid/grid_scroll/grid_scroll_layout_algorithm.cpp b/frameworks/core/components_ng/pattern/grid/grid_scroll/grid_scroll_layout_algorithm.cpp index 9a64c902704..d74c9997844 100644 --- a/frameworks/core/components_ng/pattern/grid/grid_scroll/grid_scroll_layout_algorithm.cpp +++ b/frameworks/core/components_ng/pattern/grid/grid_scroll/grid_scroll_layout_algorithm.cpp @@ -1919,7 +1919,7 @@ float GridScrollLayoutAlgorithm::FillNewCacheLineBackward( } } auto currentIndex = info_.endIndex_ + 1; - for (uint32_t i = (line->second.empty() ? 0 : line->second.rbegin()->first); i < crossCount_ - 1; i++) { + for (uint32_t i = (line->second.empty() ? 0 : line->second.rbegin()->first); i < crossCount_; i++) { // Step1. Get wrapper of [GridItem] auto itemWrapper = layoutWrapper->GetChildByIndex(currentIndex, true); if (!itemWrapper || itemWrapper->CheckNeedForceMeasureAndLayout()) {