!39846 【swiper】修复swiper不在视窗内时自动轮播

Merge pull request !39846 from ShihaoWang/fix_autoplay
This commit is contained in:
openharmony_ci 2024-08-08 09:33:45 +00:00 committed by Gitee
commit 6df390fc14
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 2 deletions

View File

@ -4154,7 +4154,7 @@ void SwiperPattern::RegisterVisibleAreaChange()
CHECK_NULL_VOID(host);
pipeline->AddWindowStateChangedCallback(host->GetId());
if (hasVisibleChangeRegistered_ || !IsAutoPlay()) {
if (hasVisibleChangeRegistered_) {
return;
}

View File

@ -960,7 +960,7 @@ private:
bool isInit_ = true;
bool hasVisibleChangeRegistered_ = false;
bool isVisible_ = true;
bool isVisibleArea_ = true;
bool isVisibleArea_ = false;
bool isWindowShow_ = true;
bool isCustomSize_ = false;
bool indicatorIsBoolean_ = true;