mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 15:10:30 +00:00
!38338 修复Refresh组件refreshingContent属性置为undefined时默认刷新效果异常的问题
Merge pull request !38338 from zhangDH/refresh
This commit is contained in:
commit
f80793b3ae
@ -82,6 +82,19 @@ void RefreshPattern::OnAttachToFrameNode()
|
||||
host->GetRenderContext()->UpdateClipEdge(true);
|
||||
}
|
||||
|
||||
bool RefreshPattern::OnDirtyLayoutWrapperSwap(
|
||||
const RefPtr<LayoutWrapper>& dirty, const DirtySwapConfig& config)
|
||||
{
|
||||
if (isRemoveCustomBuilder_) {
|
||||
UpdateFirstChildPlacement();
|
||||
if (isRefreshing_) {
|
||||
UpdateLoadingProgressStatus(RefreshAnimationState::RECYCLE, GetFollowRatio());
|
||||
}
|
||||
isRemoveCustomBuilder_ = false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void RefreshPattern::OnModifyDone()
|
||||
{
|
||||
Pattern::OnModifyDone();
|
||||
@ -308,11 +321,8 @@ void RefreshPattern::InitChildNode()
|
||||
if (Container::GreatOrEqualAPIVersion(PlatformVersion::VERSION_ELEVEN)) {
|
||||
auto progressContext = progressChild_->GetRenderContext();
|
||||
CHECK_NULL_VOID(progressContext);
|
||||
UpdateFirstChildPlacement();
|
||||
if (isRefreshing_) {
|
||||
UpdateLoadingProgressStatus(RefreshAnimationState::RECYCLE, GetFollowRatio());
|
||||
}
|
||||
UpdateLoadingTextOpacity(1.0f);
|
||||
progressContext->UpdateOpacity(0.0f);
|
||||
UpdateLoadingTextOpacity(0.0f);
|
||||
} else {
|
||||
UpdateLoadingProgress();
|
||||
}
|
||||
@ -523,9 +533,12 @@ void RefreshPattern::AddCustomBuilderNode(const RefPtr<NG::UINode>& builder)
|
||||
auto host = GetHost();
|
||||
CHECK_NULL_VOID(host);
|
||||
if (!builder) {
|
||||
host->RemoveChild(customBuilder_);
|
||||
isCustomBuilderExist_ = false;
|
||||
customBuilder_ = nullptr;
|
||||
if (isCustomBuilderExist_) {
|
||||
host->RemoveChild(customBuilder_);
|
||||
isCustomBuilderExist_ = false;
|
||||
customBuilder_ = nullptr;
|
||||
isRemoveCustomBuilder_ = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -105,6 +105,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
bool OnDirtyLayoutWrapperSwap(const RefPtr<LayoutWrapper>& dirty, const DirtySwapConfig& config) override;
|
||||
void InitPanEvent(const RefPtr<GestureEventHub>& gestureHub);
|
||||
void HandleDragStart(bool isDrag = true, float mainSpeed = 0.0f);
|
||||
ScrollResult HandleDragUpdate(float delta, float mainSpeed = 0.0f);
|
||||
@ -156,6 +157,7 @@ private:
|
||||
bool isRefreshing_ = false;
|
||||
bool isKeyEventRegisted_ = false;
|
||||
bool hasLoadingText_ = false;
|
||||
bool isRemoveCustomBuilder_ = false;
|
||||
RefPtr<FrameNode> progressChild_;
|
||||
RefPtr<FrameNode> loadingTextNode_;
|
||||
RefPtr<FrameNode> columnNode_;
|
||||
|
Loading…
Reference in New Issue
Block a user