mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-28 22:10:27 +08:00
bin: Adapt to new event callback
This commit is contained in:
@@ -298,6 +298,6 @@ impl App {
|
||||
.to_boxed()
|
||||
});
|
||||
|
||||
tui::run(channel, state, window).await
|
||||
tui::run(channel, state, window.to_boxed()).await
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ impl<'a: 'static> Widget for Browser<'a> {
|
||||
)
|
||||
.content(Box::<Table<State, Message, NotificationItem, 9>>::new(
|
||||
Table::new(state, tx.clone())
|
||||
.on_event(|table| {
|
||||
.on_event(|table, _| {
|
||||
table
|
||||
.downcast_mut::<Table<State, Message, NotificationItem, 9>>()
|
||||
.and_then(|table| {
|
||||
@@ -422,7 +422,7 @@ impl Widget for Search {
|
||||
base: WidgetBase::new(tx.clone()),
|
||||
_props: SearchProps {},
|
||||
input: TextField::new(state, tx.clone())
|
||||
.on_event(|widget| {
|
||||
.on_event(|widget, _| {
|
||||
widget
|
||||
.downcast_mut::<TextField<State, Message>>()
|
||||
.and_then(|field| {
|
||||
@@ -536,7 +536,7 @@ impl<'a: 'static> Widget for HelpPage<'a> {
|
||||
)
|
||||
.content(
|
||||
Paragraph::new(state, tx.clone())
|
||||
.on_event(|paragraph| {
|
||||
.on_event(|paragraph, _| {
|
||||
paragraph
|
||||
.downcast_mut::<Paragraph<'_, State, Message>>()
|
||||
.and_then(|paragraph| {
|
||||
|
||||
@@ -217,6 +217,6 @@ impl App {
|
||||
.to_boxed()
|
||||
});
|
||||
|
||||
tui::run(channel, state, window).await
|
||||
tui::run(channel, state, window.to_boxed()).await
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ impl<'a: 'static> Widget for Browser<'a> {
|
||||
)
|
||||
.content(Box::<Table<State, Message, IssueItem, 8>>::new(
|
||||
Table::new(state, tx.clone())
|
||||
.on_event(|table| {
|
||||
.on_event(|table, _| {
|
||||
table
|
||||
.downcast_mut::<Table<State, Message, IssueItem, 8>>()
|
||||
.and_then(|table| {
|
||||
@@ -441,7 +441,7 @@ impl Widget for Search {
|
||||
base: WidgetBase::new(tx.clone()),
|
||||
_props: SearchProps {},
|
||||
input: TextField::new(state, tx.clone())
|
||||
.on_event(|widget| {
|
||||
.on_event(|widget, _| {
|
||||
widget
|
||||
.downcast_mut::<TextField<State, Message>>()
|
||||
.and_then(|field| {
|
||||
@@ -552,7 +552,7 @@ impl<'a: 'static> Widget for HelpPage<'a> {
|
||||
)
|
||||
.content(
|
||||
Paragraph::new(state, tx.clone())
|
||||
.on_event(|paragraph| {
|
||||
.on_event(|paragraph, _| {
|
||||
paragraph
|
||||
.downcast_mut::<Paragraph<'_, State, Message>>()
|
||||
.and_then(|paragraph| {
|
||||
|
||||
@@ -218,6 +218,6 @@ impl App {
|
||||
.to_boxed()
|
||||
});
|
||||
|
||||
tui::run(channel, state, window).await
|
||||
tui::run(channel, state, window.to_boxed()).await
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ impl<'a: 'static> Widget for Browser<'a> {
|
||||
)
|
||||
.content(Box::<Table<State, Message, PatchItem, 9>>::new(
|
||||
Table::new(state, tx.clone())
|
||||
.on_event(|table| {
|
||||
.on_event(|table, _| {
|
||||
table
|
||||
.downcast_mut::<Table<State, Message, PatchItem, 9>>()
|
||||
.and_then(|table| {
|
||||
@@ -464,7 +464,7 @@ impl Widget for Search {
|
||||
base: WidgetBase::new(tx.clone()),
|
||||
_props: SearchProps {},
|
||||
input: TextField::new(state, tx.clone())
|
||||
.on_event(|widget| {
|
||||
.on_event(|widget, _| {
|
||||
widget
|
||||
.downcast_mut::<TextField<State, Message>>()
|
||||
.and_then(|field| {
|
||||
@@ -575,7 +575,7 @@ impl<'a: 'static> Widget for HelpPage<'a> {
|
||||
)
|
||||
.content(
|
||||
Paragraph::new(state, tx.clone())
|
||||
.on_event(|paragraph| {
|
||||
.on_event(|paragraph, _| {
|
||||
paragraph
|
||||
.downcast_mut::<Paragraph<'_, State, Message>>()
|
||||
.and_then(|paragraph| {
|
||||
|
||||
Reference in New Issue
Block a user