Skip to content

Commit

Permalink
remove duplicated handle keys for inspection
Browse files Browse the repository at this point in the history
  • Loading branch information
pythops committed Oct 5, 2024
1 parent 5015cc7 commit d4914c8
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions oryx-tui/src/section.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
Expand Down

0 comments on commit d4914c8

Please sign in to comment.