From ee0d6ded272c738aa3b0a99a358052c42071084d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ioan=20Biz=C4=83u?= Date: Fri, 15 Nov 2024 12:18:35 +0100 Subject: [PATCH] chore(core): remove unused confirm_more on TS5 [no changelog] --- .../embed/rust/src/ui/model_mercury/layout.rs | 35 ------------------- core/mocks/generated/trezorui2.pyi | 11 ------ 2 files changed, 46 deletions(-) diff --git a/core/embed/rust/src/ui/model_mercury/layout.rs b/core/embed/rust/src/ui/model_mercury/layout.rs index 45fb6a7c79..03b7a4e73e 100644 --- a/core/embed/rust/src/ui/model_mercury/layout.rs +++ b/core/embed/rust/src/ui/model_mercury/layout.rs @@ -1082,31 +1082,6 @@ extern "C" fn new_confirm_with_info(n_args: usize, args: *const Obj, kwargs: *mu unsafe { util::try_with_args_and_kwargs(n_args, args, kwargs, block) } } -extern "C" fn new_confirm_more(n_args: usize, args: *const Obj, kwargs: *mut Map) -> Obj { - let block = move |_args: &[Obj], kwargs: &Map| { - let title: TString = kwargs.get(Qstr::MP_QSTR_title)?.try_into()?; - let items: Obj = kwargs.get(Qstr::MP_QSTR_items)?; - - let mut paragraphs = ParagraphVecLong::new(); - - for para in IterBuf::new().try_iterate(items)? { - let [font, text]: [Obj; 2] = util::iter_into_array(para)?; - let style: &TextStyle = theme::textstyle_number(font.try_into()?); - let text: TString = text.try_into()?; - paragraphs.add(Paragraph::new(style, text)); - } - - let obj = LayoutObj::new(SwipeUpScreen::new( - Frame::left_aligned(title, SwipeContent::new(paragraphs.into_paragraphs())) - .with_cancel_button() - .with_footer(TR::instructions__swipe_up.into(), None) - .with_swipe(Direction::Up, SwipeSettings::default()), - ))?; - Ok(obj.into()) - }; - unsafe { util::try_with_args_and_kwargs(n_args, args, kwargs, block) } -} - extern "C" fn new_confirm_coinjoin(n_args: usize, args: *const Obj, kwargs: *mut Map) -> Obj { let block = move |_args: &[Obj], kwargs: &Map| { let max_rounds: TString = kwargs.get(Qstr::MP_QSTR_max_rounds)?.try_into()?; @@ -1812,16 +1787,6 @@ pub static mp_module_trezorui2: Module = obj_module! { /// context menu.""" Qstr::MP_QSTR_confirm_with_info => obj_fn_kw!(0, new_confirm_with_info).as_obj(), - /// def confirm_more( - /// *, - /// title: str, - /// button: str, - /// items: Iterable[tuple[int, str]], - /// ) -> LayoutObj[UiResult]: - /// """Confirm long content with the possibility to go back from any page. - /// Meant to be used with confirm_with_info.""" - Qstr::MP_QSTR_confirm_more => obj_fn_kw!(0, new_confirm_more).as_obj(), - /// def confirm_coinjoin( /// *, /// max_rounds: str, diff --git a/core/mocks/generated/trezorui2.pyi b/core/mocks/generated/trezorui2.pyi index b9ba54cde8..a8d7004cb1 100644 --- a/core/mocks/generated/trezorui2.pyi +++ b/core/mocks/generated/trezorui2.pyi @@ -280,17 +280,6 @@ def confirm_with_info( context menu.""" -# rust/src/ui/model_mercury/layout.rs -def confirm_more( - *, - title: str, - button: str, - items: Iterable[tuple[int, str]], -) -> LayoutObj[UiResult]: - """Confirm long content with the possibility to go back from any page. - Meant to be used with confirm_with_info.""" - - # rust/src/ui/model_mercury/layout.rs def confirm_coinjoin( *,