history of buffers implemented now
This commit is contained in:
@@ -25,6 +25,7 @@ use crate::modes::{
|
||||
};
|
||||
use crate::config::binds::key_sequences::KeySequenceTracker;
|
||||
use crate::modes::handlers::mode_manager::{ModeManager, AppMode};
|
||||
use crate::state::app::state::AppView;
|
||||
use crate::tui::functions::common::form::SaveOutcome;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
@@ -80,6 +81,21 @@ impl EventHandler {
|
||||
let current_mode = ModeManager::derive_mode(app_state, self);
|
||||
app_state.update_mode(current_mode);
|
||||
|
||||
// Determine the current view, including dynamic names
|
||||
let current_view = {
|
||||
let ui = &app_state.ui;
|
||||
if ui.show_intro { AppView::Intro }
|
||||
else if ui.show_login { AppView::Login }
|
||||
else if ui.show_register { AppView::Register }
|
||||
else if ui.show_admin { AppView::Admin }
|
||||
else if ui.show_form {
|
||||
let form_name = app_state.selected_profile.clone().unwrap_or_else(|| "Data Form".to_string());
|
||||
AppView::Form(form_name)
|
||||
}
|
||||
else { AppView::Scratch }
|
||||
};
|
||||
app_state.ui.update_buffer_history(current_view);
|
||||
|
||||
// --- DIALOG MODALITY ---
|
||||
if app_state.ui.dialog.dialog_show {
|
||||
if let Some(dialog_result) = dialog::handle_dialog_event(
|
||||
|
||||
Reference in New Issue
Block a user