fix(scroll): fix infinite loop in scroll_end events (#6109)

This commit is contained in:
Gabor Kiss-Vamosi
2024-05-01 05:51:48 +02:00
committed by GitHub
parent 447f9b8f48
commit 92ea719669
3 changed files with 2 additions and 5 deletions
+2 -1
View File
@@ -677,7 +677,8 @@ static void scroll_y_anim(void * obj, int32_t v)
static void scroll_end_cb(lv_anim_t * a)
{
lv_obj_send_event(a->var, LV_EVENT_SCROLL_END, NULL);
/*Do not sent END event if there wasn't a BEGIN*/
if(a->start_cb_called) lv_obj_send_event(a->var, LV_EVENT_SCROLL_END, NULL);
}
static void scroll_area_into_view(const lv_area_t * area, lv_obj_t * child, lv_point_t * scroll_value,
-1
View File
@@ -96,7 +96,6 @@ void lv_flex_init(void)
{
layout_list_def[LV_LAYOUT_FLEX].cb = flex_update;
layout_list_def[LV_LAYOUT_FLEX].user_data = NULL;
}
void lv_obj_set_flex_flow(lv_obj_t * obj, lv_flex_flow_t flow)
-3
View File
@@ -353,9 +353,6 @@ static void anim_timer(lv_timer_t * param)
lv_anim_t * a = _lv_ll_get_head(anim_ll_p);
while(a != NULL) {
// printf("%p, %d\n", a, a->start_value);
uint32_t elaps = lv_tick_elaps(a->last_timer_run);
a->act_time += elaps;