Question about _lv_indev_scroll_throw_handler

I used lvgl 8.2.

when I touch the screen and drag, _lv_indev_scroll_throw_handler() function will be called.
and lv_obj_scroll_by() function will be called by proc variable in _lv_indev_scroll_throw_handler(),

when we reviewed lv_obj_scroll_by function, I found out scroll animation is created and start it in lv_obj_scroll function.
however, When animation ends by the code below, the scroll_anim_ready_cb() function is called.
occure the LV_EVENT_SCROLL_END function from that function.
* lv_anim_set_ready_cb(&a, scroll_anim_ready_cb);

However, at the end of the _lv_indev_scroll_throw_handler() function,
a SCROLL_END event is generated again as shown below, and as a result, two scroll end events are generated.
Is this intended code?

static void scroll_anim_ready_cb(lv_anim_t * a)
{
lv_event_send(a->var, LV_EVENT_SCROLL_END, NULL);
}

void _lv_indev_scroll_throw_handler(_lv_indev_proc_t * proc)
{

lv_event_send(scroll_obj, LV_EVENT_SCROLL_END, indev_act);
if(proc->reset_query) return;

     proc->types.pointer.scroll_dir = LV_DIR_NONE;
     proc->types.pointer.scroll_obj = NULL;
 }

}

We really should have a dedicated event for ending scrolls initiated by the touch. Until that you can check the lv_event_get_param() == NULL in the SCROLL_END event. If it’s not NULL, it was the end of the scroll throw.

Thanks. It’s very useful for me

lv_event_send(a->var, LV_EVENT_SCROLL_END, NULL);
lv_event_send(scroll_obj, LV_EVENT_SCROLL_END, indev_act);