From 0fe4ec5c3189f7e04d85e45007945a21781318a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ioan=20Biz=C4=83u?= Date: Fri, 4 Apr 2025 12:45:55 +0200 Subject: [PATCH] fixup! feat(eckhart): introduce the device menu --- core/embed/rust/src/ui/layout_bolt/ui_firmware.rs | 2 +- core/embed/rust/src/ui/layout_delizia/ui_firmware.rs | 2 +- core/embed/rust/src/ui/layout_eckhart/component/button.rs | 5 ++++- .../src/ui/layout_eckhart/firmware/device_menu_screen.rs | 4 ---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/core/embed/rust/src/ui/layout_bolt/ui_firmware.rs b/core/embed/rust/src/ui/layout_bolt/ui_firmware.rs index b6035c422b..376e4633b8 100644 --- a/core/embed/rust/src/ui/layout_bolt/ui_firmware.rs +++ b/core/embed/rust/src/ui/layout_bolt/ui_firmware.rs @@ -870,7 +870,7 @@ impl FirmwareUI for UIBolt { Ok(layout) } - fn show_device_menu(_failed_backup: bool, _battery_percentage: u8, _paired_devices: Vec, 1>) -> Result { + fn show_device_menu(_failed_backup: bool, _battery_percentage: u8, _paired_devices: heapless::Vec, 1>) -> Result { Err::, Error>(Error::ValueError(c"show_device_menu not supported")) } diff --git a/core/embed/rust/src/ui/layout_delizia/ui_firmware.rs b/core/embed/rust/src/ui/layout_delizia/ui_firmware.rs index 693880564d..d243707c56 100644 --- a/core/embed/rust/src/ui/layout_delizia/ui_firmware.rs +++ b/core/embed/rust/src/ui/layout_delizia/ui_firmware.rs @@ -888,7 +888,7 @@ impl FirmwareUI for UIDelizia { Ok(layout) } - fn show_device_menu(_failed_backup: bool, _battery_percentage: u8, _paired_devices: Vec, 1>) -> Result { + fn show_device_menu(_failed_backup: bool, _battery_percentage: u8, _paired_devices: heapless::Vec, 1>) -> Result { Err::, Error>(Error::ValueError(c"show_device_menu not supported")) } diff --git a/core/embed/rust/src/ui/layout_eckhart/component/button.rs b/core/embed/rust/src/ui/layout_eckhart/component/button.rs index e6ac6467c3..de09f9a467 100644 --- a/core/embed/rust/src/ui/layout_eckhart/component/button.rs +++ b/core/embed/rust/src/ui/layout_eckhart/component/button.rs @@ -13,7 +13,10 @@ use crate::{ }, }; -use super::super::{fonts, theme}; +#[cfg(feature = "bootloader")] +use super::super::fonts; + +use super::super::theme; pub enum ButtonMsg { Pressed, diff --git a/core/embed/rust/src/ui/layout_eckhart/firmware/device_menu_screen.rs b/core/embed/rust/src/ui/layout_eckhart/firmware/device_menu_screen.rs index b51d22085d..0935eae5da 100644 --- a/core/embed/rust/src/ui/layout_eckhart/firmware/device_menu_screen.rs +++ b/core/embed/rust/src/ui/layout_eckhart/firmware/device_menu_screen.rs @@ -2,7 +2,6 @@ use crate::{ strutil::TString, ui::{ component::{ - base::AttachType, text::paragraphs::{Paragraph, Paragraphs}, Component, Event, EventCtx, }, @@ -456,9 +455,6 @@ impl<'a> Component for DeviceMenuScreen<'a> { } fn event(&mut self, ctx: &mut EventCtx, event: Event) -> Option { - // Update the menu when the screen is attached - if let Event::Attach(AttachType::Initial) = event {} - // Handle the event for the active menu match self.subscreens[self.active_subscreen] { Subscreen::Submenu(..) => match self.menu_screen.event(ctx, event) {