From 2b2a2c1fc2eea3aefe7d71911c4ab9d2a5546b38 Mon Sep 17 00:00:00 2001 From: matejcik Date: Thu, 7 Mar 2024 10:13:22 +0100 Subject: [PATCH] fix(core): correctly repaint ShowMore component when requested --- core/embed/rust/src/ui/model_tr/component/show_more.rs | 5 +++-- core/embed/rust/src/ui/model_tr/layout.rs | 10 +++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/core/embed/rust/src/ui/model_tr/component/show_more.rs b/core/embed/rust/src/ui/model_tr/component/show_more.rs index 717481d90..0070dc4e4 100644 --- a/core/embed/rust/src/ui/model_tr/component/show_more.rs +++ b/core/embed/rust/src/ui/model_tr/component/show_more.rs @@ -1,7 +1,7 @@ use crate::{ strutil::TString, ui::{ - component::{Child, Component, Event, EventCtx}, + component::{Child, Component, Event, EventCtx, Never}, geometry::{Insets, Rect}, }, }; @@ -42,7 +42,7 @@ where impl Component for ShowMore where - T: Component, + T: Component, { type Msg = CancelInfoConfirmMsg; @@ -55,6 +55,7 @@ where } fn event(&mut self, ctx: &mut EventCtx, event: Event) -> Option { + self.content.event(ctx, event); let button_event = self.buttons.event(ctx, event); if let Some(ButtonControllerMsg::Triggered(pos, _)) = button_event { diff --git a/core/embed/rust/src/ui/model_tr/layout.rs b/core/embed/rust/src/ui/model_tr/layout.rs index efa314615..f5c3e339f 100644 --- a/core/embed/rust/src/ui/model_tr/layout.rs +++ b/core/embed/rust/src/ui/model_tr/layout.rs @@ -21,18 +21,14 @@ use crate::{ trezorhal::model, ui::{ component::{ - base::Component, - connect::Connect, - paginated::{PageMsg, Paginate}, - text::{ + base::Component, connect::Connect, paginated::{PageMsg, Paginate}, text::{ op::OpTextLayout, paragraphs::{ Checklist, Paragraph, ParagraphSource, ParagraphVecLong, ParagraphVecShort, Paragraphs, VecExt, }, TextStyle, - }, - ComponentExt, FormattedText, Label, LineBreaking, Timeout, + }, ComponentExt, FormattedText, Label, LineBreaking, Never, Timeout }, display, geometry, layout::{ @@ -66,7 +62,7 @@ impl From for Obj { impl ComponentMsgObj for ShowMore where - T: Component, + T: Component, { fn msg_try_into_obj(&self, msg: Self::Msg) -> Result { match msg {