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:
parent
b326e48cf6
commit
e2cad979ce
2 changed files with 24 additions and 4 deletions
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue