From d4914c8606bb6a04372da6b6daa0513128534ce7 Mon Sep 17 00:00:00 2001 From: Badr Date: Sat, 5 Oct 2024 20:43:41 +0200 Subject: [PATCH] remove duplicated handle keys for inspection --- oryx-tui/src/section.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/oryx-tui/src/section.rs b/oryx-tui/src/section.rs index 47060e9..79f5aa7 100644 --- a/oryx-tui/src/section.rs +++ b/oryx-tui/src/section.rs @@ -131,16 +131,11 @@ impl Section { FocusedSection::Firewall => self.focused_section = FocusedSection::Alerts, }, - _ => { - if self.focused_section == FocusedSection::Inspection { - self.inspection.handle_keys(key_event); - } - match self.focused_section { - FocusedSection::Inspection => self.inspection.handle_keys(key_event), - FocusedSection::Firewall => self.firewall.handle_keys(key_event)?, - _ => {} - } - } + _ => match self.focused_section { + FocusedSection::Inspection => self.inspection.handle_keys(key_event), + FocusedSection::Firewall => self.firewall.handle_keys(key_event)?, + _ => {} + }, } Ok(()) }