sidebar fixed bugs and buffer implementation 1

This commit is contained in:
filipriec
2025-04-14 22:14:01 +02:00
parent 0917654361
commit 8745c9ea2f
8 changed files with 125 additions and 24 deletions

View File

@@ -43,12 +43,6 @@ pub async fn handle_navigation_event(
previous_option(app_state, intro_state);
return Ok(EventOutcome::Ok(String::new()));
}
"toggle_sidebar" => {
toggle_sidebar(app_state);
return Ok(EventOutcome::Ok(format!("Sidebar {}",
if app_state.ui.show_sidebar { "shown" } else { "hidden" }
)));
}
"next_field" => {
next_field(form_state);
return Ok(EventOutcome::Ok(String::new()));
@@ -140,10 +134,6 @@ pub fn previous_option(app_state: &mut AppState, intro_state: &mut IntroState) {
}
}
pub fn toggle_sidebar(app_state: &mut AppState) {
app_state.ui.show_sidebar = !app_state.ui.show_sidebar;
}
pub fn next_field(form_state: &mut FormState) {
if !form_state.fields.is_empty() {
form_state.current_field = (form_state.current_field + 1) % form_state.fields.len();