fixes, still 2 errors remaining
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// TODO THIS is freaking bloated with functions it never uses REFACTOR 200 LOC can be gone
|
||||
use crossterm::event::{KeyEvent, KeyCode, KeyModifiers};
|
||||
use crate::config::binds::config::Config;
|
||||
use crate::state::canvas_state::CanvasState;
|
||||
use crate::state::pages::form::FormState;
|
||||
use crate::services::grpc_client::GrpcClient;
|
||||
use crate::tui::functions::common::form::{save, revert};
|
||||
|
||||
@@ -210,8 +210,8 @@ impl EventHandler {
|
||||
}
|
||||
|
||||
// Let edit mode handle its own actions (including navigation from common bindings)
|
||||
if app_state.ui.show_login {
|
||||
let result = edit::handle_edit_event_internal(
|
||||
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
|
||||
@@ -221,9 +221,9 @@ impl EventHandler {
|
||||
current_position,
|
||||
total_count,
|
||||
grpc_client,
|
||||
).await?;
|
||||
).await?
|
||||
} else {
|
||||
let result = edit::handle_edit_event_internal(
|
||||
edit::handle_edit_event_internal(
|
||||
key,
|
||||
config,
|
||||
form_state,
|
||||
@@ -233,8 +233,8 @@ impl EventHandler {
|
||||
current_position,
|
||||
total_count,
|
||||
grpc_client,
|
||||
).await?;
|
||||
}
|
||||
).await?
|
||||
};
|
||||
|
||||
self.key_sequence_tracker.reset();
|
||||
return Ok((false, result));
|
||||
|
||||
Reference in New Issue
Block a user