fixing this
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use crate::state::app::state::AppState;
|
||||
use crate::state::pages::admin::AdminState;
|
||||
|
||||
pub fn handle_admin_selection(app_state: &mut AppState) {
|
||||
pub fn handle_admin_selection(app_state: &mut AppState, admin_state: &AdminState) {
|
||||
let profiles = &app_state.profile_tree.profiles;
|
||||
if !profiles.is_empty() && app_state.general.selected_item < profiles.len() {
|
||||
app_state.selected_profile = Some(profiles[app_state.general.selected_item].name.clone());
|
||||
|
||||
@@ -103,7 +103,7 @@ pub async fn back_to_main(
|
||||
|
||||
// Reset focus state
|
||||
app_state.ui.focus_outside_canvas = false;
|
||||
app_state.general.selected_item = 0;
|
||||
app_state.focused_button_index= 0;
|
||||
|
||||
"Returned to main menu".to_string()
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ pub async fn back_to_main(
|
||||
|
||||
// Reset focus state
|
||||
app_state.ui.focus_outside_canvas = false;
|
||||
app_state.general.selected_item = 0; // Reset intro selection
|
||||
app_state.button_focus_index = 0;
|
||||
|
||||
"Returned to main menu".to_string()
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ pub fn handle_intro_selection(app_state: &mut AppState, index: usize) { // Add i
|
||||
app_state.ui.show_intro = false;
|
||||
app_state.ui.show_register = true;
|
||||
app_state.ui.focus_outside_canvas = false;
|
||||
app_state.general.selected_item = 0;
|
||||
app_state.button_focus_index = 0;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user