working now, able to switch between form_e and auth_e

This commit is contained in:
filipriec
2025-04-05 00:42:56 +02:00
parent 704bb7401a
commit 1eaa716f42
2 changed files with 99 additions and 71 deletions

View File

@@ -210,31 +210,21 @@ impl EventHandler {
}
// Let edit mode handle its own actions (including navigation from common bindings)
let result = if app_state.ui.show_login {
edit::handle_edit_event_internal(
key,
config,
&mut self.auth_state, // Use auth_state instead of form_state
&mut self.ideal_cursor_column,
&mut self.command_message,
&mut app_state.ui.is_saved,
current_position,
total_count,
grpc_client,
).await?
} else {
edit::handle_edit_event_internal(
key,
config,
form_state,
&mut self.ideal_cursor_column,
&mut self.command_message,
&mut app_state.ui.is_saved,
current_position,
total_count,
grpc_client,
).await?
};
let result = edit::handle_edit_event(
app_state.ui.show_login,
key,
config,
form_state,
&mut self.auth_state,
&mut self.ideal_cursor_column,
&mut self.command_message,
&mut app_state.ui.is_saved,
current_position,
total_count,
grpc_client,
).await?;
self.key_sequence_tracker.reset();
return Ok((false, result));