From ff6f6c1e3ab7e1cbcb1bb72c5fbe0b33a78fcd5a Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 11 Sep 2024 09:22:36 -0600 Subject: [PATCH] dialog: order by last modified by default, do not list directories first, part of #335 --- src/dialog.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/dialog.rs b/src/dialog.rs index d53ed4d..da9c580 100644 --- a/src/dialog.rs +++ b/src/dialog.rs @@ -545,9 +545,15 @@ impl Application for App { }, }); - let mut tab = Tab::new(location, TabConfig::default()); + let tab_config = TabConfig { + view: tab::View::List, + folders_first: false, + sort_name: tab::HeadingOptions::Modified, + sort_direction: false, + ..Default::default() + }; + let mut tab = Tab::new(location, tab_config); tab.dialog = Some(flags.kind.clone()); - tab.config.view = tab::View::List; let mut app = App { core,