Files
komp_ac/client/src/tui/functions/admin.rs
2025-04-14 14:05:20 +02:00

12 lines
440 B
Rust

use crate::state::app::state::AppState;
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 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());
}
}
}