aboutsummaryrefslogtreecommitdiff
path: root/src/app/state.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-04-08 18:27:16 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-04-08 18:27:16 +0300
commitc62599de008fa898a973138c558fd32732e206de (patch)
treeb65f15385943c5dbfe4e3da54787572f9d76f30f /src/app/state.rs
parent3689515f6a11d0f7635067de2f964b63288c645b (diff)
feat: add debounced session autosave
Diffstat (limited to 'src/app/state.rs')
-rw-r--r--src/app/state.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/app/state.rs b/src/app/state.rs
index 2904b206..ea388daa 100644
--- a/src/app/state.rs
+++ b/src/app/state.rs
@@ -626,9 +626,15 @@ pub struct AppState {
pub global_menu: MenuListState,
/// Resolved host terminal default colors for theming embedded panes.
pub host_terminal_theme: TerminalTheme,
+ /// Set when a persisted session snapshot would change.
+ pub session_dirty: bool,
}
impl AppState {
+ pub(crate) fn mark_session_dirty(&mut self) {
+ self.session_dirty = true;
+ }
+
pub fn sound_enabled(&self) -> bool {
self.sound.enabled
}
@@ -780,6 +786,7 @@ impl AppState {
},
global_menu: MenuListState::new(0),
host_terminal_theme: TerminalTheme::default(),
+ session_dirty: false,
}
}
}