diff --git a/firmware/application/ui_navigation.cpp b/firmware/application/ui_navigation.cpp index d3ebe0e90..f66706744 100644 --- a/firmware/application/ui_navigation.cpp +++ b/firmware/application/ui_navigation.cpp @@ -315,8 +315,15 @@ SystemStatusView::SystemStatusView( refresh(); }; - toggle_stealth.on_change = [this](bool v) { + toggle_stealth.on_change = [this, &nav](bool v) { pmem::set_stealth_mode(v); + if (nav.is_valid() && v) { + nav.display_modal( + "Stealth", + "You just enabled stealth mode.\n" + "When you transmit,\n" + "screen will turn off;\n"); + } refresh(); }; @@ -553,7 +560,7 @@ InformationView::InformationView( #endif if (firmware_checksum_error()) { - version.set("FLASH ERROR"); + version.set("FLASH ERR"); version.set_style(&Styles::red); } @@ -585,6 +592,10 @@ bool NavigationView::is_top() const { return view_stack.size() == 1; } +bool NavigationView::is_valid() const { + return view_stack.size() != 0; // work around to check if nav is valid, not elegant i know. so TODO +} + View* NavigationView::push_view(std::unique_ptr new_view) { free_view(); diff --git a/firmware/application/ui_navigation.hpp b/firmware/application/ui_navigation.hpp index 4b20cc825..43c219c50 100644 --- a/firmware/application/ui_navigation.hpp +++ b/firmware/application/ui_navigation.hpp @@ -94,6 +94,7 @@ class NavigationView : public View { NavigationView& operator=(NavigationView&&) = delete; bool is_top() const; + bool is_valid() const; template T* push(Args&&... args) {