From 039c390c6635ec63405742caa3d57b01394c7ce0 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Thu, 29 Aug 2024 12:02:13 +0300 Subject: [PATCH] fix(tasks): re-filter when reducing view depth --- src/tasks.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tasks.rs b/src/tasks.rs index 5734718..6a8b470 100644 --- a/src/tasks.rs +++ b/src/tasks.rs @@ -922,8 +922,13 @@ impl Tasks { // Properties pub(crate) fn set_depth(&mut self, depth: i8) { + if depth < self.depth && !self.view.is_empty() { + self.view.clear(); + info!("Cleared search and reduced view depth to {depth}"); + } else { + info!("Changed view depth to {depth}"); + } self.depth = depth; - info!("Changed view depth to {depth}"); } pub(crate) fn get_columns(&mut self) -> &mut Vec {