feat(dialog): persist global sort option (#2039)

Add dialog_sort_name field to State to track the dialog sort option.
Add state_handler and state fields to Dialog to load saved state.
Implement tab::Command::SetSort for Dialog to apply and persist sort
options.
This commit is contained in:
Huy Nguyen 2026-09-22 23:06:06 +07:00 • committed by GitHub
parent b326e48cf6
commit e2cad979ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 4 deletions

View file

@ -150,6 +150,7 @@ pub enum TypeToSearch {
#[serde(default)]
pub struct State {
pub sort_names: FxOrderMap<String, (HeadingOptions, bool)>,
pub dialog_sort_name: (HeadingOptions, bool),
}
impl Default for State {
@ -161,6 +162,7 @@ impl Default for State {
(HeadingOptions::Modified, false),
)
})),
dialog_sort_name: (HeadingOptions::Modified, false),
}
}
}