functions are now in the file dedicated to the functions belonging to the page

This commit is contained in:
filipriec
2025-03-26 00:26:36 +01:00
parent 92045a4e67
commit 11214734ae
5 changed files with 42 additions and 26 deletions

View File

@@ -0,0 +1,8 @@
use crate::state::state::AppState;
pub fn handle_admin_selection(app_state: &mut AppState) {
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());
}
}