killing of the buffer now works amazingly well
This commit is contained in:
@@ -121,10 +121,7 @@ impl EventHandler {
|
||||
else if ui.show_admin { AppView::Admin }
|
||||
else if ui.show_add_logic { AppView::AddLogic }
|
||||
else if ui.show_add_table { AppView::AddTable }
|
||||
else if ui.show_form {
|
||||
let form_name = app_state.selected_profile.clone().unwrap_or_else(|| "Data Form".to_string());
|
||||
AppView::Form(form_name)
|
||||
}
|
||||
else if ui.show_form { AppView::Form } // Remove the dynamic name part
|
||||
else { AppView::Scratch }
|
||||
};
|
||||
buffer_state.update_history(current_view);
|
||||
@@ -177,8 +174,14 @@ impl EventHandler {
|
||||
return Ok(EventOutcome::Ok("Switched to previous buffer".to_string()));
|
||||
}
|
||||
}
|
||||
//"close_buffer" => {
|
||||
// let message = buffer_state.close_buffer_with_intro_fallback();
|
||||
// return Ok(EventOutcome::Ok(message));
|
||||
//}
|
||||
"close_buffer" => {
|
||||
let message = buffer_state.close_buffer_with_intro_fallback();
|
||||
// TODO: Replace with actual table name from server response
|
||||
let current_table_name = Some("2025_customer"); // Your hardcoded table name
|
||||
let message = buffer_state.close_buffer_with_intro_fallback(current_table_name);
|
||||
return Ok(EventOutcome::Ok(message));
|
||||
}
|
||||
_ => {}
|
||||
|
||||
Reference in New Issue
Block a user