From ef8448c3f7de49b9873fec593fece8064285b7ae Mon Sep 17 00:00:00 2001 From: grdddj Date: Fri, 12 May 2023 14:48:01 +0200 Subject: [PATCH] WIP - named constant for HTC duration --- core/embed/rust/src/ui/model_tr/component/button.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/embed/rust/src/ui/model_tr/component/button.rs b/core/embed/rust/src/ui/model_tr/component/button.rs index 0848f94934..88d9b36998 100644 --- a/core/embed/rust/src/ui/model_tr/component/button.rs +++ b/core/embed/rust/src/ui/model_tr/component/button.rs @@ -13,6 +13,7 @@ use crate::{ use super::theme; const HALF_SCREEN_BUTTON_WIDTH: i16 = constant::WIDTH / 2 - 1; +const DEFAULT_DURATION_MS: u32 = 1000; #[derive(Eq, PartialEq)] pub enum ButtonMsg { @@ -464,7 +465,7 @@ impl ButtonDetails { /// Default duration of the hold-to-confirm - 1 second. pub fn with_default_duration(mut self) -> Self { - self.duration = Some(Duration::from_millis(1000)); + self.duration = Some(Duration::from_millis(DEFAULT_DURATION_MS)); self }