diff --git a/client/src/modes/general/dialog.rs b/client/src/modes/general/dialog.rs index 0d6c00f..f785cb5 100644 --- a/client/src/modes/general/dialog.rs +++ b/client/src/modes/general/dialog.rs @@ -59,14 +59,13 @@ pub async fn handle_dialog_event( DialogPurpose::LoginSuccess => { match selected_index { 0 => { // "Menu" button selected - // Hide dialog before calling action that might change state further app_state.hide_dialog(); let message = login::back_to_main(auth_state, app_state).await; return Some(Ok(EventOutcome::Ok(message))); } - 1 => { // "Exit" button selected + 1 => { app_state.hide_dialog(); - return Some(Ok(EventOutcome::Exit("Exiting via dialog".to_string()))); + return Some(Ok(EventOutcome::Ok("Exiting dialog".to_string()))); } _ => { app_state.hide_dialog(); diff --git a/client/src/modes/handlers/event.rs b/client/src/modes/handlers/event.rs index 2404234..116fc1a 100644 --- a/client/src/modes/handlers/event.rs +++ b/client/src/modes/handlers/event.rs @@ -72,16 +72,12 @@ impl EventHandler { app_state.update_mode(current_mode); // --- DIALOG MODALITY --- - // If a dialog is showing, intercept and handle ONLY dialog inputs. if app_state.ui.dialog.dialog_show { - // Pass event handling to the dedicated dialog handler, including necessary state if let Some(dialog_result) = dialog::handle_dialog_event( &event, config, app_state, auth_state, &mut self.auth_client ).await { - // If the dialog handler consumed the event, return its result return dialog_result; } - // Fallback if dialog handler returned None or event wasn't handled return Ok(EventOutcome::Ok(String::new())); } // --- END DIALOG MODALITY CHECK ---