fixing more errors, last to go

This commit is contained in:
filipriec
2025-04-07 22:46:00 +02:00
parent 10e9c3ead0
commit d7d7fd614b
7 changed files with 40 additions and 37 deletions

View File

@@ -2,7 +2,7 @@
use crate::services::grpc_client::GrpcClient;
use crate::state::canvas_state::CanvasState;
use crate::state::pages::form::FormState;
use crate::state::pages::{auth::AuthState, form::FormState};
use crate::tui::functions::common::form::{revert, save};
use crossterm::event::{KeyCode, KeyEvent};
use std::any::Any;
@@ -11,7 +11,6 @@ pub async fn execute_common_action<S: CanvasState + Any>(
action: &str,
state: &mut S,
grpc_client: &mut GrpcClient,
is_saved: &mut bool,
current_position: &mut u64,
total_count: u64,
) -> Result<String, Box<dyn std::error::Error>> {
@@ -25,14 +24,15 @@ pub async fn execute_common_action<S: CanvasState + Any>(
{
match action {
"save" => {
save(
let outcome = save(
form_state,
grpc_client,
is_saved,
current_position,
total_count,
)
.await
.await?;
let message = format!("Save successful: {:?}", outcome); // Simple message for now
Ok(message)
}
"revert" => {
revert(
@@ -62,7 +62,6 @@ pub async fn execute_edit_action<S: CanvasState>(
state: &mut S,
ideal_cursor_column: &mut usize,
grpc_client: &mut GrpcClient,
is_saved: &mut bool,
current_position: &mut u64,
total_count: u64,
) -> Result<String, Box<dyn std::error::Error>> {

View File

@@ -77,7 +77,6 @@ pub async fn execute_edit_action<S: CanvasState>(
state: &mut S,
ideal_cursor_column: &mut usize,
grpc_client: &mut GrpcClient,
is_saved: &mut bool,
current_position: &mut u64,
total_count: u64,
) -> Result<String, Box<dyn std::error::Error>> {