Skip to content

Commit

Permalink
Display: Fix processing screen not showing on nano devices
Browse files Browse the repository at this point in the history
  • Loading branch information
sgliner-ledger committed Jan 29, 2024
1 parent 34fe636 commit efbc6c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/boilerplate/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct {

// set to true when the "Processing..." screen is shown, in order for the dispatcher to know if the
// UX is not in idle state at the end of a command handler.
bool G_was_processing_screen_shown;
bool G_was_processing_screen_shown = false;

uint16_t G_interruption_timeout_start_tick;
uint16_t G_processing_timeout_start_tick;
Expand Down
4 changes: 4 additions & 0 deletions src/ui/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// These globals are a workaround for a limitation of the UX library that
// does not allow to pass proper callbacks and context.

extern bool G_was_processing_screen_shown;

static bool g_ux_flow_ended;
static bool g_ux_flow_response;

Expand All @@ -35,6 +37,8 @@ void set_ux_flow_response(bool approved) {
// so that the dispatcher refreshes resets the UI at the end of the command handler.
// Returns true/false depending if the user accepted in the corresponding UX flow.
static bool io_ui_process(dispatcher_context_t *context, bool set_dirty) {
G_was_processing_screen_shown = false;

g_ux_flow_ended = false;

if (set_dirty) {
Expand Down

0 comments on commit efbc6c0

Please sign in to comment.