Fix freeze on slow/unresponsive APDU transport

This commit is contained in:
Alexandre Paillier
2023-02-09 11:30:42 +01:00
parent 3e724ef7c2
commit 87f23349ad

View File

@@ -19,6 +19,9 @@ static void dummy_pre_cb(void) {
static void dummy_post_cb(void) { static void dummy_post_cb(void) {
if (ui_pos == UI_191_POS_QUESTION) { if (ui_pos == UI_191_POS_QUESTION) {
continue_displaying_message(); continue_displaying_message();
// temporarily disable button clicks, they will be re-enabled as soon as new data
// is received and the page is redrawn with ux_flow_init()
G_ux.stack[0].button_push_callback = NULL;
} else // UI_191_END } else // UI_191_END
{ {
ui_191_switch_to_message_end(); ui_191_switch_to_message_end();
@@ -55,6 +58,7 @@ UX_STEP_CB(
#else #else
nnn, nnn,
#endif #endif
G_ux.stack[0].button_push_callback = NULL; // disable button clicks
skip_rest_of_message(), skip_rest_of_message(),
{ {
#ifndef TARGET_NANOS #ifndef TARGET_NANOS