Skip to content

Commit

Permalink
Apply message/event suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Dec 5, 2023
1 parent 5369dd3 commit 0187ab8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/view/scroll_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,15 @@ where
&self,
id_path: &[Id],
state: &mut Self::State,
event: Box<dyn Any>,
message: Box<dyn Any>,
app_state: &mut T,
) -> MessageResult<A> {
let tl = &id_path[1..];
self.child.message(tl, &mut state.1, event, app_state)
match id_path {
[child_id, rest_path @ ..] if *child_id == state.0 => {
self.child
.message(rest_path, &mut state.1, message, app_state)
}
_ => MessageResult::Stale(message),
}
}
}

0 comments on commit 0187ab8

Please sign in to comment.