very bald changes, still destroyed
This commit is contained in:
@@ -10,7 +10,6 @@ use crate::state::pages::admin::AdminState;
|
||||
use crate::state::pages::canvas_state::CanvasState;
|
||||
use crate::ui::handlers::context::UiContext;
|
||||
use crate::modes::handlers::event::EventOutcome;
|
||||
use crate::functions::modes::navigation::admin_nav;
|
||||
|
||||
pub async fn handle_navigation_event(
|
||||
key: KeyEvent,
|
||||
@@ -100,7 +99,7 @@ pub fn move_up(app_state: &mut AppState, login_state: &mut LoginState, register_
|
||||
} else if app_state.ui.show_intro {
|
||||
app_state.ui.intro_state.previous_option();
|
||||
} else if app_state.ui.show_admin {
|
||||
admin_nav::move_admin_list_up(app_state, admin_state);
|
||||
admin_state.previous();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,13 +112,7 @@ pub fn move_down(app_state: &mut AppState, admin_state: &mut AdminState) {
|
||||
} else if app_state.ui.show_intro {
|
||||
app_state.ui.intro_state.next_option();
|
||||
} else if app_state.ui.show_admin {
|
||||
// Assuming profile_tree.profiles is the list we're navigating
|
||||
let profile_count = app_state.profile_tree.profiles.len();
|
||||
if profile_count == 0 {
|
||||
return;
|
||||
}
|
||||
|
||||
admin_nav::move_admin_list_down(app_state, admin_state);
|
||||
admin_state.next();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user