unused stuff removed

This commit is contained in:
filipriec
2025-03-26 00:43:42 +01:00
parent 3e2b8a36df
commit 4601ba4094

View File

@@ -22,16 +22,11 @@ pub async fn handle_navigation_event(
return Ok((false, String::new())); return Ok((false, String::new()));
} }
"move_down" => { "move_down" => {
let item_count = if app_state.ui.show_intro { move_down(app_state);
2 // Intro options count
} else {
app_state.profile_tree.profiles.len() // Admin panel items
};
move_down(app_state, item_count);
return Ok((false, String::new())); return Ok((false, String::new()));
} }
"next_option" => { "next_option" => {
next_option(app_state, 2); // Intro has 2 options next_option(app_state); // Intro has 2 options
return Ok((false, String::new())); return Ok((false, String::new()));
} }
"previous_option" => { "previous_option" => {
@@ -85,7 +80,7 @@ pub fn move_up(app_state: &mut AppState) {
} }
} }
pub fn move_down(app_state: &mut AppState, item_count: usize) { pub fn move_down(app_state: &mut AppState) {
if app_state.ui.show_intro { if app_state.ui.show_intro {
app_state.ui.intro_state.next_option(); app_state.ui.intro_state.next_option();
} else if app_state.ui.show_admin { } else if app_state.ui.show_admin {
@@ -99,11 +94,12 @@ pub fn move_down(app_state: &mut AppState, item_count: usize) {
} }
} }
pub fn next_option(app_state: &mut AppState, option_count: usize) { pub fn next_option(app_state: &mut AppState) { // Remove option_count parameter
if app_state.ui.show_intro { if app_state.ui.show_intro {
app_state.ui.intro_state.next_option(); app_state.ui.intro_state.next_option();
} else { } else {
// For other screens that might have options // Get option count from state instead of parameter
let option_count = app_state.profile_tree.profiles.len();
app_state.general.current_option = (app_state.general.current_option + 1) % option_count; app_state.general.current_option = (app_state.general.current_option + 1) % option_count;
} }
} }