Stateful closing and io input

This commit is contained in:
2026-07-14 21:42:29 +02:00
parent 641805e1b9
commit 809e5d1529
3 changed files with 56 additions and 22 deletions
+6 -2
View File
@@ -1,3 +1,5 @@
use std::any::Any;
use pulse_ui::{
App,
layout::{LayoutItem, layout},
@@ -10,9 +12,11 @@ pub struct PulseTradeApp {
}
impl App for PulseTradeApp {
async fn init(&mut self, ctx: pulse_ui::state::Context) {}
async fn init(&mut self, ctx: &pulse_ui::state::Context) {}
async fn update(&mut self, event: Box<dyn std::any::Any>) {}
async fn update(&mut self, ctx: &pulse_ui::state::Context, event: Box<dyn Any + Send + Sync>) {
ctx.close().await
}
async fn layout(&self) -> pulse_ui::layout::LayoutItem {
layout(vec![