Simplify Iris app initialization and task updates

This commit is contained in:
iris committed 2026-09-11 12:28:33 -04:00
1 parent b5666cdef9
commit 166bac2a93
25 files changed
+330 -282

No files matched your search

+4 -5
View File
@@ -3,7 +3,6 @@ use winit::event::WindowEvent;
#[path = "lib.rs"]
mod app;
use app::*;
#[derive(DesktopUiState)]
struct Client {
@@ -12,9 +11,9 @@ struct Client {
}
impl DesktopAppState for Client {
fn new(mut ui_state: DesktopUiState, rsc: &mut StdRsc<Self>, _: Proxy<Self::Event>) -> Self {
let widgets = build(rsc, &mut ui_state);
update_info(rsc, widgets.info, 0);
fn new(mut ui_state: DesktopUiState, rsc: &mut StdRsc<Self>) -> Self {
let widgets = app::build(rsc, &mut ui_state);
app::update_info(rsc, widgets.info, 0);
Self {
ui_state,
info: widgets.info,
@@ -22,7 +21,7 @@ impl DesktopAppState for Client {
}
fn window_event(&mut self, _: WindowEvent, rsc: &mut StdRsc<Self>) {
update_info(rsc, self.info, self.ui_state.renderer.ui.view_count());
app::update_info(rsc, self.info, self.ui_state.renderer.ui.view_count());
}
}