Simplify Iris app initialization and task updates

This commit is contained in:
iris committed 2026-09-11 12:28:33 -04:00
1 parent 8218e84b62
commit ecf74055c7
32 files changed
+409 -377

No files matched your search

+1 -3
View File
@@ -52,7 +52,7 @@ impl DesktopAppState for Client {
))
}
fn new(mut ui_state: DesktopUiState, rsc: &mut StdRsc<Self>, _: Proxy<Self::Event>) -> Self {
fn new(mut ui_state: DesktopUiState, rsc: &mut StdRsc<Self>) -> Self {
let screen = match ai_app::ui::fixture::open(rsc, &mut ui_state) {
Ok(opened) => {
if let Some(message) = message_argv() {
@@ -60,7 +60,6 @@ impl DesktopAppState for Client {
}
if let Some(text) = typed_argv() {
let field = opened.screen.composer.field;
let redraw = rsc.tasks.redraw_handle();
rsc.spawn_task(async move |mut ctx| {
for ch in text.chars() {
tokio::time::sleep(std::time::Duration::from_millis(100)).await;
@@ -73,7 +72,6 @@ impl DesktopAppState for Client {
}
edit.insert(&ch.to_string());
});
redraw.request_redraw();
}
});
}