diff --git a/radicle-tui/src/ui/components/container.rs b/radicle-tui/src/ui/components/container.rs index 741f39cc..495b6077 100644 --- a/radicle-tui/src/ui/components/container.rs +++ b/radicle-tui/src/ui/components/container.rs @@ -25,7 +25,7 @@ impl WidgetComponent for GlobalListener { State::None } - fn perform(&mut self, _cmd: Cmd) -> CmdResult { + fn perform(&mut self, _properties: &Props, _cmd: Cmd) -> CmdResult { CmdResult::None } } @@ -94,7 +94,7 @@ impl WidgetComponent for Tabs { State::One(StateValue::U16(self.state.selected)) } - fn perform(&mut self, cmd: Cmd) -> CmdResult { + fn perform(&mut self, _properties: &Props, cmd: Cmd) -> CmdResult { use tuirealm::command::Direction; match cmd { @@ -147,7 +147,7 @@ impl WidgetComponent for Header { State::None } - fn perform(&mut self, _cmd: Cmd) -> CmdResult { + fn perform(&mut self, _properties: &Props, _cmd: Cmd) -> CmdResult { CmdResult::None } } @@ -205,7 +205,7 @@ impl WidgetComponent for LabeledContainer { State::None } - fn perform(&mut self, cmd: Cmd) -> CmdResult { + fn perform(&mut self, _properties: &Props, cmd: Cmd) -> CmdResult { self.component.perform(cmd) } } diff --git a/radicle-tui/src/ui/components/context.rs b/radicle-tui/src/ui/components/context.rs index dc92032f..8fb8181a 100644 --- a/radicle-tui/src/ui/components/context.rs +++ b/radicle-tui/src/ui/components/context.rs @@ -50,7 +50,7 @@ impl WidgetComponent for Shortcut { State::None } - fn perform(&mut self, _cmd: Cmd) -> CmdResult { + fn perform(&mut self, _properties: &Props, _cmd: Cmd) -> CmdResult { CmdResult::None } } @@ -98,7 +98,7 @@ impl WidgetComponent for Shortcuts { State::None } - fn perform(&mut self, _cmd: Cmd) -> CmdResult { + fn perform(&mut self, _properties: &Props, _cmd: Cmd) -> CmdResult { CmdResult::None } } diff --git a/radicle-tui/src/ui/components/label.rs b/radicle-tui/src/ui/components/label.rs index 2a9a4897..dcfecda5 100644 --- a/radicle-tui/src/ui/components/label.rs +++ b/radicle-tui/src/ui/components/label.rs @@ -49,7 +49,7 @@ impl WidgetComponent for Label { State::None } - fn perform(&mut self, _cmd: Cmd) -> CmdResult { + fn perform(&mut self, _properties: &Props, _cmd: Cmd) -> CmdResult { CmdResult::None } } diff --git a/radicle-tui/src/ui/components/list.rs b/radicle-tui/src/ui/components/list.rs index 5d65faeb..38c5469d 100644 --- a/radicle-tui/src/ui/components/list.rs +++ b/radicle-tui/src/ui/components/list.rs @@ -58,7 +58,7 @@ impl WidgetComponent for Property { State::None } - fn perform(&mut self, _cmd: Cmd) -> CmdResult { + fn perform(&mut self, _properties: &Props, _cmd: Cmd) -> CmdResult { CmdResult::None } } @@ -99,7 +99,7 @@ impl WidgetComponent for PropertyList { State::None } - fn perform(&mut self, _cmd: Cmd) -> CmdResult { + fn perform(&mut self, _properties: &Props, _cmd: Cmd) -> CmdResult { CmdResult::None } } diff --git a/radicle-tui/src/ui/widget.rs b/radicle-tui/src/ui/widget.rs index 9bbe32ee..0d4d8ae6 100644 --- a/radicle-tui/src/ui/widget.rs +++ b/radicle-tui/src/ui/widget.rs @@ -12,7 +12,7 @@ pub trait WidgetComponent { fn state(&self) -> State; - fn perform(&mut self, cmd: Cmd) -> CmdResult; + fn perform(&mut self, properties: &Props, cmd: Cmd) -> CmdResult; } #[derive(Clone)] @@ -95,6 +95,6 @@ impl MockComponent for Widget { } fn perform(&mut self, cmd: Cmd) -> CmdResult { - self.component.perform(cmd) + self.component.perform(&self.properties, cmd) } }