buffer its independent, needs fixes

This commit is contained in:
filipriec
2025-04-15 13:57:17 +02:00
parent f42790980d
commit f94006dd08
7 changed files with 86 additions and 56 deletions

View File

@@ -2,11 +2,11 @@
use crate::config::binds::config::Config;
use crate::config::colors::themes::Theme;
use crate::modes::common::commands::CommandHandler;
use crate::modes::handlers::event::{EventHandler, EventOutcome}; // Import EventOutcome
use crate::modes::handlers::mode_manager::{AppMode, ModeManager};
use crate::services::grpc_client::GrpcClient;
use crate::services::ui_service::UiService;
use crate::modes::common::commands::CommandHandler;
use crate::modes::handlers::event::{EventHandler, EventOutcome};
use crate::modes::handlers::mode_manager::{AppMode, ModeManager};
use crate::state::pages::canvas_state::CanvasState;
use crate::state::pages::form::FormState;
use crate::state::pages::auth::AuthState;
@@ -14,6 +14,7 @@ use crate::state::pages::auth::LoginState;
use crate::state::pages::auth::RegisterState;
use crate::state::pages::admin::AdminState;
use crate::state::pages::intro::IntroState;
use crate::state::app::buffer::BufferState;
use crate::state::app::state::AppState;
// Import SaveOutcome
use crate::tui::terminal::{EventReader, TerminalCore};
@@ -35,6 +36,7 @@ pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
let mut register_state = RegisterState::default();
let mut intro_state = IntroState::default();
let mut admin_state = AdminState::default();
let mut buffer_state = BufferState::default();
let mut app_state = AppState::new()?;
// Initialize app state with profile tree and table structure
@@ -60,6 +62,7 @@ pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
&login_state,
&register_state,
&intro_state,
&buffer_state,
&mut admin_state,
&theme,
is_edit_mode,
@@ -121,6 +124,7 @@ pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
&mut login_state,
&mut register_state,
&mut intro_state,
&mut buffer_state,
&mut admin_state,
&mut app_state,
total_count,