2021-12-29 21:53:47 +01:00
|
|
|
#include "bobbyerrorhandler.h"
|
|
|
|
|
|
|
|
// 3rdparty lib includes
|
|
|
|
#include <screenmanager.h>
|
|
|
|
|
|
|
|
// local includes
|
|
|
|
#include "displays/bobbypopupdisplay.h"
|
|
|
|
|
2022-06-15 10:55:35 +02:00
|
|
|
void BobbyErrorHandler::errorOccurred(std::string &&error)
|
2021-12-29 21:53:47 +01:00
|
|
|
{
|
2023-08-13 22:33:45 +02:00
|
|
|
espgui::changeScreenCallback = [error_ = std::move(error)](espgui::TftInterface &tft) mutable {
|
|
|
|
auto newDisplay = std::make_unique<BobbyPopupDisplay>(std::move(error_), std::move(espgui::currentDisplay));
|
|
|
|
newDisplay->initOverlay(tft);
|
|
|
|
espgui::currentDisplay = std::move(newDisplay);
|
|
|
|
};
|
2021-12-29 21:53:47 +01:00
|
|
|
}
|