Add history pruning with configurable max entries and max days

This commit is contained in:
2026-03-06 15:22:17 +02:00
parent 2ad0538a13
commit acb60e409a
4 changed files with 41 additions and 0 deletions

View File

@@ -271,6 +271,10 @@ pub fn build_settings_dialog() -> adw::PreferencesDialog {
});
}
// Preserve history settings from current config (not exposed in UI yet)
let hist_max_entries = config.history_max_entries;
let hist_max_days = config.history_max_days;
// Save settings when the dialog closes
dialog.connect_closed(move |_| {
let new_config = AppConfig {
@@ -305,6 +309,8 @@ pub fn build_settings_dialog() -> adw::PreferencesDialog {
high_contrast: contrast_row.is_active(),
large_text: large_text_row.is_active(),
reduced_motion: motion_row.is_active(),
history_max_entries: hist_max_entries,
history_max_days: hist_max_days,
};
let store = ConfigStore::new();