Radish alpha
r
Radicle terminal user interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
bin: Adapt to new event callback
Erik Kundt committed 1 year ago
commit f712ba6d2baf21f3aeb5cad2118a377370cf8abd
parent 0b1da2af7808e029fc8f7dd934c5ccbebcb8cc2d
6 files changed +12 -12
modified bin/commands/inbox/select.rs
@@ -298,6 +298,6 @@ impl App {
                    .to_boxed()
            });

-
        tui::run(channel, state, window).await
+
        tui::run(channel, state, window.to_boxed()).await
    }
}
modified bin/commands/inbox/select/ui.rs
@@ -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| {
modified bin/commands/issue/select.rs
@@ -217,6 +217,6 @@ impl App {
                    .to_boxed()
            });

-
        tui::run(channel, state, window).await
+
        tui::run(channel, state, window.to_boxed()).await
    }
}
modified bin/commands/issue/select/ui.rs
@@ -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| {
modified bin/commands/patch/select.rs
@@ -218,6 +218,6 @@ impl App {
                    .to_boxed()
            });

-
        tui::run(channel, state, window).await
+
        tui::run(channel, state, window.to_boxed()).await
    }
}
modified bin/commands/patch/select/ui.rs
@@ -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| {