fix(color): Firmware update progress text stuck at device reset (#3704)

* fixes #3695 flash progress

* move init() to where it belongs (constructor)
This commit is contained in:
Michael
2023-06-22 20:34:09 +10:00
committed by GitHub
parent 009b638783
commit d57961917e
2 changed files with 9 additions and 7 deletions
+8 -2
View File
@@ -45,6 +45,9 @@ FullScreenDialog::FullScreenDialog(
Layer::push(this); Layer::push(this);
bringToTop(); bringToTop();
init();
lv_obj_add_event_cb(lvobj, FullScreenDialog::long_pressed, LV_EVENT_LONG_PRESSED, nullptr); lv_obj_add_event_cb(lvobj, FullScreenDialog::long_pressed, LV_EVENT_LONG_PRESSED, nullptr);
} }
@@ -105,8 +108,6 @@ void FullScreenDialog::init()
void FullScreenDialog::paint(BitmapBuffer * dc) void FullScreenDialog::paint(BitmapBuffer * dc)
{ {
init();
OpenTxTheme::instance()->drawBackground(dc); OpenTxTheme::instance()->drawBackground(dc);
dc->drawFilledRect(0, ALERT_FRAME_TOP, LCD_W, ALERT_FRAME_HEIGHT, SOLID, dc->drawFilledRect(0, ALERT_FRAME_TOP, LCD_W, ALERT_FRAME_HEIGHT, SOLID,
@@ -175,6 +176,11 @@ void FullScreenDialog::deleteLater(bool detach, bool trash)
} }
} }
void FullScreenDialog::setMessage(std::string text)
{
messageLabel->setText(text);
}
static void run_ui_manually() static void run_ui_manually()
{ {
checkBacklight(); checkBacklight();
+1 -5
View File
@@ -48,11 +48,7 @@ class FullScreenDialog : public Window
} }
#endif #endif
void setMessage(std::string text) void setMessage(std::string text);
{
message = std::move(text);
invalidate();
}
void paint(BitmapBuffer * dc) override; void paint(BitmapBuffer * dc) override;