From c0d0064c71d038f21daf52fbccefcc3302837c80 Mon Sep 17 00:00:00 2001 From: Yobe Zhou <33565334+YobeZhou@users.noreply.github.com> Date: Mon, 21 Nov 2022 16:43:36 +0800 Subject: [PATCH] fix(file_explorer): fix the problem that the rows and columns obtained are uncertain Because of the problems encountered when using keys, LV_EVENT_VALUE_CHANGEDis actually triggered after LV_EVENT_CLICKED , and the rollback is performed here, regardless of the use of keys. --- src/lv_100ask_file_explorer/lv_100ask_file_explorer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_100ask_file_explorer/lv_100ask_file_explorer.c b/src/lv_100ask_file_explorer/lv_100ask_file_explorer.c index 67a11a4..4b2c44a 100644 --- a/src/lv_100ask_file_explorer/lv_100ask_file_explorer.c +++ b/src/lv_100ask_file_explorer/lv_100ask_file_explorer.c @@ -560,7 +560,7 @@ static void brower_file_event_handler(lv_event_t * e) lv_100ask_file_explorer_t * explorer = (lv_100ask_file_explorer_t *)obj; - if(code == LV_EVENT_CLICKED) { + if(code == LV_EVENT_VALUE_CHANGED) { //struct stat stat_buf; char * file_name[LV_100ASK_FILE_EXPLORER_PATH_MAX_LEN]; char * str_fn = NULL;