INNER CODE UNIT · Rust

Some

owu/wsl-dashboard · src/app/tasks/mod.rs:34

                if let Some(app) = ah.upgrade() {
                    let is_visible = app.get_is_window_visible();
                    // Only refresh if the Home tab (index 0) is selected to save resources
                    if app.get_selected_tab() == 0 {
                        let as_ptr_res = as_ptr.clone();
                        tokio::spawn(async move {
                            if crate::ui::data::should_refresh_wsl("periodic trigger", is_visible) {
                                let dashboard = {
                                    let state = as_ptr_res.lock().await;
                                    state.wsl_dashboard.clone()
                                };
                                let _ = dashboard.refresh_distros().await;
                            }
                        });
                    }
                }
            });
        }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…