From 355aff3032b5bf7488b93062daa4e6d591281a21 Mon Sep 17 00:00:00 2001 From: filipriec Date: Mon, 24 Mar 2025 15:13:57 +0100 Subject: [PATCH] working perfectly well right now --- client/src/ui/handlers/render.rs | 17 ++++++++--------- client/src/ui/handlers/ui.rs | 1 - 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/client/src/ui/handlers/render.rs b/client/src/ui/handlers/render.rs index b65729a..9cb5d34 100644 --- a/client/src/ui/handlers/render.rs +++ b/client/src/ui/handlers/render.rs @@ -26,7 +26,7 @@ pub fn render_ui( command_mode: bool, command_message: &str, app_state: &AppState, - intro_state: &intro::IntroState, + // intro_state parameter removed ) { render_background(f, f.area(), theme); @@ -41,10 +41,9 @@ pub fn render_ui( let main_content_area = root[0]; if app_state.ui.show_intro { - intro_state.render(f, main_content_area, theme); + // Use app_state's intro_state directly + app_state.ui.intro_state.render(f, main_content_area, theme); } else if app_state.ui.show_admin { - // Create temporary AdminPanelState for rendering - // Create temporary AdminPanelState for rendering let mut admin_state = AdminPanelState::new( app_state.profile_tree.profiles @@ -66,7 +65,7 @@ pub fn render_ui( f, main_content_area, theme, - &app_state.profile_tree, + &app_state.profile_tree, &app_state.selected_profile, ); } else if app_state.ui.show_form { @@ -77,10 +76,10 @@ pub fn render_ui( if let Some(sidebar_rect) = sidebar_area { sidebar::render_sidebar( - f, - sidebar_rect, - theme, - &app_state.profile_tree, + f, + sidebar_rect, + theme, + &app_state.profile_tree, &app_state.selected_profile ); } diff --git a/client/src/ui/handlers/ui.rs b/client/src/ui/handlers/ui.rs index 0871063..cd46e45 100644 --- a/client/src/ui/handlers/ui.rs +++ b/client/src/ui/handlers/ui.rs @@ -74,7 +74,6 @@ pub async fn run_ui() -> Result<(), Box> { event_handler.command_mode, &event_handler.command_message, &app_state, - &intro_state, ); })?;