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