we compiled for now
This commit is contained in:
@@ -93,7 +93,7 @@ pub fn move_up(app_state: &mut AppState, login_state: &mut LoginState, register_
|
||||
register_state.set_current_field(last_field_index);
|
||||
}
|
||||
} else {
|
||||
app_state.focused_button_index = app_state.general.selected_item.saturating_sub(1);
|
||||
app_state.focused_button_index = app_state.focused_button_index.saturating_sub(1);
|
||||
}
|
||||
} else if app_state.ui.show_intro {
|
||||
app_state.ui.intro_state.previous_option();
|
||||
@@ -121,7 +121,7 @@ pub fn next_option(app_state: &mut AppState) { // Remove option_count parameter
|
||||
} else {
|
||||
// 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.focused_button_index = (app_state.focused_button_index + 1) % option_count;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,10 +130,10 @@ pub fn previous_option(app_state: &mut AppState) {
|
||||
app_state.ui.intro_state.previous_option();
|
||||
} else {
|
||||
let option_count = app_state.profile_tree.profiles.len();
|
||||
app_state.general.current_option = if app_state.general.current_option == 0 {
|
||||
app_state.focused_button_index = if app_state.focused_button_index == 0 {
|
||||
option_count.saturating_sub(1)
|
||||
} else {
|
||||
app_state.general.current_option - 1
|
||||
app_state.focused_button_index - 1
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user