From 30832a42f731af89dc72e3e1f40c780d62fc38ec Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Wed, 25 May 2022 01:56:20 +0200 Subject: [PATCH] Removed unnecessarily complicated popup --- main/displays/menus/featureflagsmenu.cpp | 33 ++---------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/main/displays/menus/featureflagsmenu.cpp b/main/displays/menus/featureflagsmenu.cpp index 9352200..989ea63 100644 --- a/main/displays/menus/featureflagsmenu.cpp +++ b/main/displays/menus/featureflagsmenu.cpp @@ -24,42 +24,13 @@ constexpr char TEXT_POPUP[] = "Feature flags have been changed. Please restart t bool isDirty{false}; -class SpecialPopupDisplay : public BobbyPopupDisplay -{ - using Base = BobbyPopupDisplay; - using Base::Base; -public: - void buttonPressed(espgui::Button button) override - { - //Base::buttonPressed(button); - - switch (button) - { - using espgui::Button; - case Button::Left: - case Button::Right: - espgui::popScreen(); - break; - default:; - } - } -}; - void exitFeatureFlagsMenu() { + espgui::popScreen(); if (isDirty) { - using namespace espgui; - // auto newDisplay = std::make_unique(, std::move(espgui::displayStack.top())); - // newDisplay->initOverlay(); - // espgui::currentDisplay = std::move(newDisplay); - - auto newDisplay = std::make_unique(TEXT_POPUP, std::move(espgui::displayStack.top())); - newDisplay->initOverlay(); - espgui::currentDisplay = std::move(newDisplay); + BobbyErrorHandler{}.errorOccured(TEXT_POPUP); } - else - espgui::popScreen(); } class ExitFeatureFlagsMenuAction : public virtual espgui::ActionInterface