Skip to content

Commit

Permalink
PanelDue: fixed initial displaying of messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mfs12 committed Apr 21, 2023
1 parent 2c77cbf commit 9e884d6
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/PanelDue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,17 @@ static void EndReceivedMessage()
}
FileManager::EndReceivedMessage();

// alert event handling
if (currentAlert.flags.IsBitSet(Alert::GotMode) && currentAlert.mode == Alert::Mode::None)
{
UI::ClearAlert();
}
else if (currentAlert.mode != Alert::Mode::None && currentAlert.seq != lastAlertSeq)
{
UI::ProcessAlert(currentAlert);
lastAlertSeq = currentAlert.seq;
}

if (thumbnailContext.parseErr != 0 || thumbnailContext.err != 0)
{
dbg("thumbnail parseErr %d err %d.\n",
Expand Down Expand Up @@ -2562,17 +2573,6 @@ int main(void)
}
}

// alert event handling
if (currentAlert.flags.IsBitSet(Alert::GotMode) && currentAlert.mode == Alert::Mode::None)
{
UI::ClearAlert();
}
else if (currentAlert.mode > Alert::Mode::None && currentAlert.seq != lastAlertSeq)
{
UI::ProcessAlert(currentAlert);
lastAlertSeq = currentAlert.seq;
}

// refresh the display
UpdateDebugInfo();
mgr.Refresh(false);
Expand Down

0 comments on commit 9e884d6

Please sign in to comment.