From 0c5e8ab544823fbb4936c536ee1d8a66298f7e51 Mon Sep 17 00:00:00 2001 From: Shav Kinderlehrer Date: Mon, 11 Mar 2024 09:21:46 -0400 Subject: Pass actions to components --- src/app.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/app.rs') diff --git a/src/app.rs b/src/app.rs index 17c8bc3..5e6ab1f 100644 --- a/src/app.rs +++ b/src/app.rs @@ -128,6 +128,12 @@ impl App { fn handle_action(&mut self, action: AppAction) -> Result<()> { match action { AppAction::Quit => Ok(self.quit()?), + _ => { + for component in &mut self.components { + component.handle_action(action.clone()); + } + Ok(()) + } } } } -- cgit v1.2.3