Skip to content

Commit

Permalink
fix(color): Firmware update progress text stuck at device reset (#3704)
Browse files Browse the repository at this point in the history
* fixes #3695 flash progress

* move init() to where it belongs (constructor)
  • Loading branch information
mha1 authored Jun 22, 2023
1 parent 009b638 commit d579619
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 8 additions & 2 deletions radio/src/gui/colorlcd/fullscreen_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ FullScreenDialog::FullScreenDialog(
Layer::push(this);

bringToTop();

init();

lv_obj_add_event_cb(lvobj, FullScreenDialog::long_pressed, LV_EVENT_LONG_PRESSED, nullptr);
}

Expand Down Expand Up @@ -105,8 +108,6 @@ void FullScreenDialog::init()

void FullScreenDialog::paint(BitmapBuffer * dc)
{
init();

OpenTxTheme::instance()->drawBackground(dc);

dc->drawFilledRect(0, ALERT_FRAME_TOP, LCD_W, ALERT_FRAME_HEIGHT, SOLID,
Expand Down Expand Up @@ -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()
{
checkBacklight();
Expand Down
6 changes: 1 addition & 5 deletions radio/src/gui/colorlcd/fullscreen_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ class FullScreenDialog : public Window
}
#endif

void setMessage(std::string text)
{
message = std::move(text);
invalidate();
}
void setMessage(std::string text);

void paint(BitmapBuffer * dc) override;

Expand Down

0 comments on commit d579619

Please sign in to comment.