bin: Adapt to new event callback

This commit is contained in:
Erik Kundt
2024-05-21 17:30:34 +02:00
parent 0b1da2af78
commit f712ba6d2b
6 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -298,6 +298,6 @@ impl App {
.to_boxed()
});
tui::run(channel, state, window).await
tui::run(channel, state, window.to_boxed()).await
}
}
+3 -3
View File
@@ -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| {
+1 -1
View File
@@ -217,6 +217,6 @@ impl App {
.to_boxed()
});
tui::run(channel, state, window).await
tui::run(channel, state, window.to_boxed()).await
}
}
+3 -3
View File
@@ -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| {
+1 -1
View File
@@ -218,6 +218,6 @@ impl App {
.to_boxed()
});
tui::run(channel, state, window).await
tui::run(channel, state, window.to_boxed()).await
}
}
+3 -3
View File
@@ -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| {