Significantly improve search time
This commit is contained in:
parent
32659abb2e
commit
26e18a719c
2 changed files with 196 additions and 99 deletions
|
|
@ -58,7 +58,7 @@ pub fn context_menu<'a>(
|
|||
.on_press(tab::Message::ContextAction(action))
|
||||
};
|
||||
|
||||
let (sort_name, sort_direction) = tab.sort_options();
|
||||
let (sort_name, sort_direction, _) = tab.sort_options();
|
||||
let sort_item = |label, variant| {
|
||||
menu_item(
|
||||
format!(
|
||||
|
|
@ -290,7 +290,7 @@ pub fn dialog_menu<'a>(
|
|||
tab: &Tab,
|
||||
key_binds: &HashMap<KeyBind, Action>,
|
||||
) -> Element<'static, Message> {
|
||||
let (sort_name, sort_direction) = tab.sort_options();
|
||||
let (sort_name, sort_direction, _) = tab.sort_options();
|
||||
let sort_item = |label, sort, dir| {
|
||||
menu::Item::CheckBox(
|
||||
label,
|
||||
|
|
@ -383,7 +383,7 @@ pub fn menu_bar<'a>(
|
|||
let sort_item = |label, sort, dir| {
|
||||
menu::Item::CheckBox(
|
||||
label,
|
||||
sort_options.map_or(false, |(sort_name, sort_direction)| {
|
||||
sort_options.map_or(false, |(sort_name, sort_direction, _)| {
|
||||
sort_name == sort && sort_direction == dir
|
||||
}),
|
||||
Action::SetSort(sort, dir),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue