Rebuild update of custom buttons on Home page

Improves #1802
This commit is contained in:
Edward Firmo
2024-02-19 20:10:25 +01:00
parent 5bc202ed81
commit cfd0c51bfe
2 changed files with 18 additions and 25 deletions

View File

@@ -468,8 +468,14 @@ api:
visible: bool
then:
- lambda: |-
if (!id(is_uploading_tft)) {
// Do something
if (!id(is_uploading_tft) and !(id.empty())) {
if (!(icon.empty())) disp1->set_component_text_printf("%s_icon", id.c_str(), icon.c_str());
if (icon_color.size() == 3) set_component_color->execute((id + "_icon").c_str(), icon_color);
if (visible) {
disp1->show_component(id.c_str());
} else {
disp1->hide_component(id.c_str());
}
}
# Init Global Service