From 0525f7cda81808f48675a8334cba9c4f8fad28ba Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Wed, 11 May 2022 11:40:15 +0200 Subject: [PATCH] Fixes bad multi-screen value behaviour --- src_features/signMessageEIP712/ui_logic.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src_features/signMessageEIP712/ui_logic.c b/src_features/signMessageEIP712/ui_logic.c index d03cd1a..23d4ed9 100644 --- a/src_features/signMessageEIP712/ui_logic.c +++ b/src_features/signMessageEIP712/ui_logic.c @@ -133,7 +133,13 @@ void ui_712_new_field(const void *const field_ptr, const uint8_t *const data, default: PRINTF("Unhandled type\n"); } - ux_flow_prev(); + + // not pretty, manually changes the internal state of the UX flow + // so that we always land on the first screen of a paging step without any visible + // screen glitching (quick screen switching) + G_ux.flow_stack[G_ux.stack_count - 1].index = 0; + // since the flow now thinks we are displaying the first step, do next + ux_flow_next(); } /**