continuation of the fixes
This commit is contained in:
@@ -3,7 +3,9 @@ use crate::state::pages::admin::AdminState;
|
||||
|
||||
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());
|
||||
if let Some(selected_index) = admin_state.get_selected_index() {
|
||||
if let Some(profile) = profiles.get(selected_index) {
|
||||
app_state.selected_profile = Some(profile.name.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user