mirror of
https://github.com/openharmony/ace_ace_engine.git
synced 2026-07-19 05:07:57 -04:00
fix swiper in launcher don't show child
Signed-off-by: caocan <1532643766@qq.com> Change-Id: I86a307d16b9a48776c8fb8665fc1687a9622cf90
This commit is contained in:
@@ -189,7 +189,9 @@ void RenderSwiper::Update(const RefPtr<Component>& component)
|
||||
remoteMessageEvent_ = AceAsyncEvent<void(const std::shared_ptr<ClickInfo>&)>::Create(
|
||||
swiper->GetRemoteMessageEventId(), context_);
|
||||
RegisterChangeEndListener(COMPONENT_CHANGE_END_LISTENER_KEY, swiper->GetChangeEndListener());
|
||||
if (swiper && swiper_ && (*swiper == *swiper_) && currentIndex_ == static_cast<int32_t>(swiper->GetIndex())) {
|
||||
auto lazyComponent = swiper->GetLazyForEachComponent();
|
||||
if (swiper && swiper_ && (*swiper == *swiper_) &&
|
||||
currentIndex_ == static_cast<int32_t>(swiper->GetIndex()) && lazyComponent) {
|
||||
LOGI("swiper not changed");
|
||||
swiper_ = swiper;
|
||||
return;
|
||||
@@ -254,7 +256,6 @@ void RenderSwiper::Update(const RefPtr<Component>& component)
|
||||
showIndicator_ = swiper->IsShowIndicator();
|
||||
|
||||
lazyLoadCacheSize_ = swiper->GetCachedSize() * 2 + swiper->GetDisplayCount();
|
||||
auto lazyComponent = swiper->GetLazyForEachComponent();
|
||||
UpdateItemCount(lazyComponent ? static_cast<int32_t>(lazyComponent->TotalCount()) : itemCount_);
|
||||
ClearItems(lazyComponent, static_cast<int32_t>(swiper->GetIndex()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user