mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2025-02-23 01:22:05 +00:00
fix scroll nestedScrollVelocity
Signed-off-by: hongzexuan <hongzexuan@huawei.com> Change-Id: Idf3f7aae693c63276537bed49a181e41b22b42d5
This commit is contained in:
parent
5e22574eb8
commit
c4fa19180a
@ -3799,9 +3799,7 @@ float ScrollablePattern::GetNestedScrollVelocity()
|
||||
if (NearZero(nestedScrollVelocity_)) {
|
||||
return 0.0f;
|
||||
}
|
||||
auto pipeline = GetContext();
|
||||
CHECK_NULL_RETURN(pipeline, 0.0f);
|
||||
uint64_t currentVsync = pipeline->GetVsyncTime();
|
||||
uint64_t currentVsync = static_cast<uint64_t>(GetSysTimestamp());
|
||||
uint64_t diff = currentVsync - nestedScrollTimestamp_;
|
||||
if (diff >= MAX_VSYNC_DIFF_TIME) {
|
||||
nestedScrollVelocity_ = 0.0f;
|
||||
|
Loading…
x
Reference in New Issue
Block a user