From bbba67a25337c8a1054c60b2a9747c92e870958d Mon Sep 17 00:00:00 2001 From: filipriec Date: Tue, 15 Apr 2025 20:19:30 +0200 Subject: [PATCH] buffer for form fix performed --- client/src/tui/functions/intro.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/tui/functions/intro.rs b/client/src/tui/functions/intro.rs index de92f12..ca0d055 100644 --- a/client/src/tui/functions/intro.rs +++ b/client/src/tui/functions/intro.rs @@ -13,10 +13,10 @@ pub fn handle_intro_selection( index: usize, ) { let target_view = match index { - 0 => buffer_state.history.iter().rev() - .find(|v| matches!(v, AppView::Form(_))) - .cloned() - .unwrap_or_else(|| AppView::Form("Default".to_string())), + 0 => { + let form_name = app_state.selected_profile.clone().unwrap_or_else(|| "Data Form".to_string()); + AppView::Form(form_name) + } 1 => AppView::Admin, 2 => AppView::Login, 3 => AppView::Register,