killing of the buffer now works amazingly well

This commit is contained in:
filipriec
2025-05-25 22:24:26 +02:00
parent d8f9372bbd
commit 32210a5f7c
7 changed files with 38 additions and 18 deletions

View File

@@ -201,7 +201,7 @@ pub fn render_ui(
// Render buffer list if enabled and area is available
if let Some(area) = buffer_list_area {
if app_state.ui.show_buffer_list {
render_buffer_list(f, area, theme, buffer_state);
render_buffer_list(f, area, theme, buffer_state, app_state);
}
}
render_status_line(f, status_line_area, current_dir, theme, is_edit_mode, current_fps);

View File

@@ -104,7 +104,7 @@ pub async fn run_ui() -> Result<()> {
// --- DATA2: Adjust initial view based on auth status ---
if auto_logged_in {
// User is auto-logged in, go to main app view
buffer_state.history = vec![AppView::Form("Adresar".to_string())];
buffer_state.history = vec![AppView::Form];
buffer_state.active_index = 0;
info!("Initial view set to Form due to auto-login.");
}
@@ -163,7 +163,7 @@ pub async fn run_ui() -> Result<()> {
}
AppView::AddTable => app_state.ui.show_add_table = true,
AppView::AddLogic => app_state.ui.show_add_logic = true,
AppView::Form(_) => app_state.ui.show_form = true,
AppView::Form => app_state.ui.show_form = true,
AppView::Scratch => {} // Or show a scratchpad component
}
}