From 06182b6970d9def5af37ff38dedf8c6e5f02ac5b Mon Sep 17 00:00:00 2001 From: zcdqs Date: Wed, 26 Jun 2024 20:28:37 +0800 Subject: [PATCH] fix footer inactive Signed-off-by: zcdqs Change-Id: Ib87bc1a505db3c355326fbb20474d8583f3a63bb --- .../waterflow/layout/top_down/water_flow_layout_algorithm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frameworks/core/components_ng/pattern/waterflow/layout/top_down/water_flow_layout_algorithm.cpp b/frameworks/core/components_ng/pattern/waterflow/layout/top_down/water_flow_layout_algorithm.cpp index d9a0a24787b..8b74141f75a 100644 --- a/frameworks/core/components_ng/pattern/waterflow/layout/top_down/water_flow_layout_algorithm.cpp +++ b/frameworks/core/components_ng/pattern/waterflow/layout/top_down/water_flow_layout_algorithm.cpp @@ -251,8 +251,6 @@ void WaterFlowLayoutAlgorithm::Layout(LayoutWrapper* layoutWrapper) } } layoutInfo_->firstIndex_ = firstIndex; - LayoutFooter(layoutWrapper, childFrameOffset, layoutProperty->IsReverse()); - auto cachedCount = layoutProperty->GetCachedCountValue(1); layoutWrapper->SetActiveChildRange(layoutInfo_->NodeIdx(layoutInfo_->FirstIdx()), layoutInfo_->NodeIdx(layoutInfo_->endIndex_), cachedCount, cachedCount); @@ -260,6 +258,8 @@ void WaterFlowLayoutAlgorithm::Layout(LayoutWrapper* layoutWrapper) WaterFlowLayoutUtils::CreateChildConstraint( { itemsCrossPosition_.find(0)->second, mainSize_, axis_ }, layoutProperty, nullptr), cachedCount); + + LayoutFooter(layoutWrapper, childFrameOffset, layoutProperty->IsReverse()); } void WaterFlowLayoutAlgorithm::LayoutFooter(LayoutWrapper* layoutWrapper, const OffsetF& childFrameOffset, bool reverse)