compiled time to render register properly well

This commit is contained in:
filipriec
2025-04-10 19:32:49 +02:00
parent 431882ece9
commit 5f5d690ff3
3 changed files with 6 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ use crate::services::ui_service::UiService;
use crate::state::canvas_state::CanvasState;
use crate::state::pages::auth::AuthState;
use crate::state::pages::form::FormState;
use crate::state::pages::auth::RegisterState;
use crate::state::state::AppState;
// Import SaveOutcome
use crate::tui::terminal::{EventReader, TerminalCore};
@@ -22,7 +23,8 @@ pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
let mut grpc_client = GrpcClient::new().await?;
let mut command_handler = CommandHandler::new();
let theme = Theme::from_str(&config.colors.theme);
let mut auth_state = AuthState::default(); // The single source of truth for AuthState
let mut auth_state = AuthState::default();
let mut register_state = RegisterState::default();
// Initialize app_state first
let mut app_state = AppState::new()?;
@@ -111,6 +113,7 @@ pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
&mut command_handler,
&mut form_state,
&mut auth_state,
&mut register_state,
&mut app_state,
total_count, // Pass the count *before* potential save
&mut current_position,