From 80bf20cda19d2edb4050049d1be3cceb02c6c6dd Mon Sep 17 00:00:00 2001 From: Marco De Araujo Date: Sat, 7 Feb 2026 14:34:04 -0400 Subject: [PATCH] Fix typo --- src/ui/app.rs | 2 +- src/ui/components/monitor_list.rs | 4 ++-- src/ui/dashboard/model.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/app.rs b/src/ui/app.rs index 0dc9c9c..2e19131 100644 --- a/src/ui/app.rs +++ b/src/ui/app.rs @@ -191,7 +191,7 @@ impl App { } let max_scroll = state - .get_total_lenght() + .get_total_length() .saturating_sub(area[0].height as usize) .saturating_add(1); diff --git a/src/ui/components/monitor_list.rs b/src/ui/components/monitor_list.rs index f0cff07..ae89733 100644 --- a/src/ui/components/monitor_list.rs +++ b/src/ui/components/monitor_list.rs @@ -38,7 +38,7 @@ static STATUS_LINE_CACHE: OnceLock>>> = OnceLo pub fn render_monitor_list(main_frame: &mut Frame, area: Rect, state: &mut DashboardViewState) { let available_height = area.height as usize; - let max_scroll = state.get_total_lenght().saturating_sub(available_height); + let max_scroll = state.get_total_length().saturating_sub(available_height); if state.scroll_state.get_position() > max_scroll { state.scroll_state = state.scroll_state.position(max_scroll); @@ -48,7 +48,7 @@ pub fn render_monitor_list(main_frame: &mut Frame, area: Rect, state: &mut Dashb let mut current_y = area.y as usize; let mut rendered_height = 0; let mut lines_skipped = 0; - let half = state.get_total_lenght().saturating_div(2); + let half = state.get_total_length().saturating_div(2); for group in state.groups.iter() { let group_height = group.monitors.len() + BORDER_LINES_VIEW; diff --git a/src/ui/dashboard/model.rs b/src/ui/dashboard/model.rs index a59595a..6425d2b 100644 --- a/src/ui/dashboard/model.rs +++ b/src/ui/dashboard/model.rs @@ -81,7 +81,7 @@ impl DashboardViewState { } } - pub fn get_total_lenght(&self) -> usize { + pub fn get_total_length(&self) -> usize { self.total_length }