From 08eb666f7b45cc9d160c4ea2a36d6a12f00281f2 Mon Sep 17 00:00:00 2001 From: Nikolay Minaylov Date: Tue, 27 Dec 2022 11:39:04 +0300 Subject: [PATCH] [FL-3000] File browser: Empty folder label (#2188) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: あく --- applications/services/gui/modules/file_browser.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/applications/services/gui/modules/file_browser.c b/applications/services/gui/modules/file_browser.c index d21a48b5..e03a032c 100644 --- a/applications/services/gui/modules/file_browser.c +++ b/applications/services/gui/modules/file_browser.c @@ -544,6 +544,18 @@ static void browser_draw_list(Canvas* canvas, FileBrowserModel* model) { model->item_cnt); } + uint32_t folder_item_cnt = (model->is_root) ? (model->item_cnt) : (model->item_cnt - 1); + if(folder_item_cnt == 0) { + canvas_set_color(canvas, ColorBlack); + canvas_draw_str_aligned( + canvas, + canvas_width(canvas) / 2, + canvas_height(canvas) / 2, + AlignCenter, + AlignCenter, + ""); + } + furi_string_free(filename); }