[FL-3000] File browser: Empty folder label (#2188)

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Nikolay Minaylov 2022-12-27 11:39:04 +03:00 committed by GitHub
parent 1390f10a6f
commit 08eb666f7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,
"<Empty>");
}
furi_string_free(filename);
}