Add history pruning with configurable max entries and max days
- Add history_max_entries (default 50) and history_max_days (default 30) to AppConfig - Add prune() method to HistoryStore that removes old entries by age and count limits - Call prune after each history entry is added in the GUI - Preserve history settings through settings dialog save/load cycle
This commit is contained in:
@@ -1629,6 +1629,11 @@ fn show_results(
|
||||
output_files,
|
||||
});
|
||||
|
||||
// Prune old history entries
|
||||
let config_store = pixstrip_core::storage::ConfigStore::new();
|
||||
let app_config = config_store.load().unwrap_or_default();
|
||||
let _ = history.prune(app_config.history_max_entries, app_config.history_max_days);
|
||||
|
||||
// Show toast
|
||||
let savings = if result.total_input_bytes > 0 {
|
||||
let pct =
|
||||
|
||||
Reference in New Issue
Block a user