Stop fallback to Home when notification is shown

Solves #1261
This commit is contained in:
Edward Firmo
2023-11-14 07:38:46 +01:00
parent bd14d7aa42
commit 6025da2850

View File

@@ -1548,12 +1548,22 @@ script:
- if:
condition:
- lambda: |-
return (page != "screensaver" and page != "boot" and page != "home" and timeout >= 1);
return (timeout >= 1 and
page != "boot" and
page != "confirm" and
page != "home" and
page != "notification" and
page != "screensaver");
then:
- delay: !lambda return (timeout *1000);
- lambda: |-
ESP_LOGV("script.timer_page", "Timed out on page: %s", current_page->state.c_str());
if (current_page->state != "screensaver" and current_page->state != "boot" and current_page->state != "home" and timeout >= 1)
if (timeout >= 1 and
current_page->state != "boot" and
current_page->state != "confirm" and
current_page->state != "home" and
current_page->state != "notification" and
current_page->state != "screensaver")
{
ESP_LOGD("script.timer_page", "Fallback to page Home");
disp1->goto_page("home");