fix(indev): use lv_anim_delete to delete scroll_throw_anim (#5324)

Signed-off-by: YanXiaowei <yanxiaowei@xiaomi.com>
Co-authored-by: YanXiaowei <yanxiaowei@xiaomi.com>
This commit is contained in:
bjsylvia
2024-01-15 18:38:13 +08:00
committed by GitHub
parent 57cda3b91c
commit 751bc99b98
2 changed files with 3 additions and 4 deletions

View File

@@ -1564,9 +1564,8 @@ static void indev_scroll_throw_anim_cb(void * var, int32_t v)
if(indev->pointer.scroll_dir == LV_DIR_NONE || indev->pointer.scroll_obj == NULL) {
if(indev->scroll_throw_anim) {
/*hacky*/
LV_LOG_INFO("stop animation");
lv_anim_set_duration(indev->scroll_throw_anim, 0);
lv_anim_delete(indev, indev_scroll_throw_anim_cb);
}
}
}