From 87cd6ff015220830d22be31db870c1fdf3fa77db Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Mon, 19 Apr 2021 20:52:45 +0530 Subject: [PATCH] Fix global help menu not displaying sort & filter --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/app.rs | 4 ++++ src/config.rs | 10 +++++----- src/config.yml | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8f575f2..c4d3f4c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1630,7 +1630,7 @@ dependencies = [ [[package]] name = "xplr" -version = "0.5.0" +version = "0.5.1" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index ca19053..3c97be1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xplr" -version = "0.5.0" # Update config.yml, config.rs and default.nix +version = "0.5.1" # Update config.yml, config.rs and default.nix authors = ["Arijit Basu "] edition = "2018" description = "A hackable, minimal, fast TUI file explorer" diff --git a/src/app.rs b/src/app.rs index 658f4fe..174ac64 100644 --- a/src/app.rs +++ b/src/app.rs @@ -2078,6 +2078,10 @@ impl App { ), (builtin.rename.name.clone(), builtin.rename), (builtin.delete.name.clone(), builtin.delete), + (builtin.sort.name.clone(), builtin.sort), + (builtin.filter.name.clone(), builtin.filter), + (builtin.relative_path_does_contain.name.clone(), builtin.relative_path_does_contain), + (builtin.relative_path_does_not_contain.name.clone(), builtin.relative_path_does_not_contain), ] .iter() .chain(custom.into_iter().collect::>().iter()) diff --git a/src/config.rs b/src/config.rs index 116a395..22f5f26 100644 --- a/src/config.rs +++ b/src/config.rs @@ -665,6 +665,7 @@ impl Config { pub fn is_compatible(&self) -> Result { let result = match self.parsed_version()? { + (0, 5, 1) => true, (0, 5, 0) => true, (_, _, _) => false, }; @@ -673,12 +674,11 @@ impl Config { } pub fn upgrade_notification(&self) -> Result> { - Ok(None) - /* let result = match self.parsed_version()? { - (0, 5, 0) => None, - (_, _, _) => Some("App version updated. New: added sorting support and some hacks: https://github.com/sayanarijit/xplr/wiki/Hacks"), + let result = match self.parsed_version()? { + (0, 5, 1) => None, + (_, _, _) => Some("App version updated. New: added sort and filter support and some hacks: https://github.com/sayanarijit/xplr/wiki/Hacks"), }; - Ok(result) */ + Ok(result) } } diff --git a/src/config.yml b/src/config.yml index 6fef742..5a7c2e6 100644 --- a/src/config.yml +++ b/src/config.yml @@ -1,4 +1,4 @@ -version: v0.5.0 +version: v0.5.1 general: show_hidden: false read_only: false