How to dynamically add button (or item) to list (or table)?

Description

Recently I am working on an email notification project on an ESP32 with TFT9341.
Now I have realized the email read function through the ESP Mail Client library. And also I could present part of the read information on one label now.
But now I have a problem dynamically presenting the information. My thoughts are dynamically adding buttons into a list, which could display the title and presents a message box if I click the corresponding button. I am not sure if it is possible to do this. If not, please tell me what to use for this function… Thank you guys for helping…: )

What MCU/Processor/Board and compiler are you using?

ESP32S

What LVGL version are you using?

The latest.

What do you want to achieve?

To dynamically add buttons to a list.

What have you tried so far?

I tried to set up a timer to occasionally add buttons (just for the experiment) / set up a timer to occasionally sent event trigger to a preset event / directly use lv_list_add_btn in the email reading function/ set up an event and send refresh event in email reading function… None of them worked…
Now I think the main problem is how to pass the list obj to the update timer…

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.
I tried to upload but failed…

My code

void list_update(lv_timer_t *e)
{   //Not working 
    char buf[32];
    lv_snprintf(buf, sizeof(buf), "Email %d", btn_cnt);
    lv_obj_t * list_btn = lv_list_add_btn(list, LV_SYMBOL_BELL, buf);
    lv_obj_add_event_cb(list_btn, list_btn_event_handler, LV_EVENT_ALL, NULL);
    btn_cnt++;
    lv_obj_move_foreground(float_add_btn);
    lv_obj_scroll_to_view(list_btn, LV_ANIM_ON);
}
static void float_btn_event_cb(lv_event_t * e)
{
    lv_event_code_t code = lv_event_get_code(e);
    lv_obj_t * float_btn = lv_event_get_target(e);
    lv_obj_t * list = (lv_obj_t *) lv_event_get_user_data(e);

    if(code == LV_EVENT_CLICKED) {
        lv_obj_clean(list);
        btn_cnt = 1;
        lv_obj_move_foreground(float_btn);
    }
} 

static void float_add_btn_event_cb(lv_event_t * e)
{
    lv_event_code_t code = lv_event_get_code(e);
    lv_obj_t * float_add_btn = lv_event_get_target(e);
    lv_obj_t * list = (lv_obj_t *) lv_event_get_user_data(e);

    if(code == LV_EVENT_CLICKED) {
        Serial.printf("float_add_btn value = %d \n", code);
        char buf[32];
        lv_snprintf(buf, sizeof(buf), "Email %d", btn_cnt);
        lv_obj_t * list_btn = lv_list_add_btn(list, LV_SYMBOL_BELL, buf);
        lv_obj_add_event_cb(list_btn, list_btn_event_handler, LV_EVENT_ALL, NULL);
        btn_cnt++;
        lv_obj_move_foreground(float_add_btn);
        lv_obj_scroll_to_view(list_btn, LV_ANIM_ON);
    }
} 

void lv_detail(void)
{
    static lv_style_t style_shadow;
    lv_style_init(&style_shadow);
    lv_style_set_shadow_width(&style_shadow, 4);
    lv_style_set_shadow_spread(&style_shadow, 2);
    lv_style_set_shadow_color(&style_shadow, lv_palette_main(LV_PALETTE_GREY));
    
    lv_obj_t * list = lv_list_create(lv_scr_act());
    lv_obj_set_size(list, 300, 160);
    lv_obj_add_style(list, &style_shadow, 0);
    lv_obj_align(list, LV_ALIGN_CENTER, 0, 30);
    
    lv_timer_t * updater = lv_timer_create(list_update, 11000,  NULL); 
    
    
    for(btn_cnt = 1; btn_cnt <= 5; btn_cnt++) {
        char buf[32];
        lv_snprintf(buf, sizeof(buf), "Email %d", btn_cnt);
        lv_obj_t * list_btn = lv_list_add_btn(list, LV_SYMBOL_BELL, buf);
        lv_obj_add_event_cb(list_btn, list_btn_event_handler, LV_EVENT_ALL, NULL);
    }

    lv_obj_t * float_btn = lv_btn_create(lv_scr_act());
    lv_obj_set_size(float_btn, 40, 40);
    lv_obj_add_flag(float_btn, LV_OBJ_FLAG_FLOATING);
    lv_obj_align(float_btn, LV_ALIGN_BOTTOM_RIGHT, -50, -30);
    lv_obj_add_event_cb(float_btn, float_btn_event_cb, LV_EVENT_ALL, list);
    lv_obj_set_style_radius(float_btn, LV_RADIUS_CIRCLE, 0);
    lv_obj_set_style_bg_img_src(float_btn, LV_SYMBOL_TRASH, 0);
    lv_obj_set_style_text_font(float_btn, lv_theme_get_font_large(float_btn), 0);

    lv_obj_t * float_add_btn = lv_btn_create(lv_scr_act());
    lv_obj_set_size(float_add_btn, 40, 40);
    lv_obj_add_flag(float_add_btn, LV_OBJ_FLAG_FLOATING);
    lv_obj_align(float_add_btn, LV_ALIGN_BOTTOM_RIGHT, -50, -80);
    lv_obj_add_event_cb(float_add_btn, float_add_btn_event_cb, LV_EVENT_ALL, list);
    lv_obj_set_style_radius(float_add_btn, LV_RADIUS_CIRCLE, 0);
    lv_obj_set_style_bg_img_src(float_add_btn, LV_SYMBOL_PLUS, 0);
    lv_obj_set_style_text_font(float_add_btn, lv_theme_get_font_large(float_add_btn), 0);
}