倒计时打断取消延时

This commit is contained in:
xiehongyan 2024-01-29 15:47:41 +08:00
parent 500d91ba50
commit bd534e426b

View File

@ -49,7 +49,7 @@ static void task_msgbox_timer_cb(lv_task_t* task)
}
if (0 == autoClose || autoOffTime <= 10)
{
printf("[task_msgbox_timer_cb][*x]auto close\n");
printf("[%s:%d]auto close.\n", __FUNCTION__, __LINE__);
lv_task_del(msgbox_timer);
msgbox_timer = NULL;
@ -57,11 +57,12 @@ static void task_msgbox_timer_cb(lv_task_t* task)
{
if (0 != autoClose)
{
printf("msg box close delay 1000.\n");
lv_msgbox_start_auto_close(msgbox, 1000);
printf("[%s:%d]msg box close.\n", __FUNCTION__, __LINE__);
lv_msgbox_start_auto_close(msgbox, 0);
}
else
{
printf("[%s:%d]msg box close delay 5s.\n", __FUNCTION__, __LINE__);
lv_msgbox_start_auto_close(msgbox, 5000);
}
}