fixed the navigation previous function, therefore we are now moving into the login properly, lets implement the auth now

This commit is contained in:
filipriec
2025-03-26 00:46:59 +01:00
parent 4601ba4094
commit 722c63af54
3 changed files with 9 additions and 10 deletions

View File

@@ -108,13 +108,12 @@ pub fn previous_option(app_state: &mut AppState) {
if app_state.ui.show_intro {
app_state.ui.intro_state.previous_option();
} else {
// For other screens that might have options
if app_state.general.current_option == 0 {
// We'd need the option count here, but since it's not passed we can't wrap around correctly
// For now, just stay at 0
let option_count = app_state.profile_tree.profiles.len();
app_state.general.current_option = if app_state.general.current_option == 0 {
option_count.saturating_sub(1) // Wrap to last option
} else {
app_state.general.current_option -= 1;
}
app_state.general.current_option - 1
};
}
}