INNER CODE UNIT · Rust

tick

pythops/bluetui · src/app.rs:749

    pub async fn tick(&mut self) -> AppResult<()> {
        self.notifications.retain(|n| n.ttl > 0);
        self.notifications.iter_mut().for_each(|n| n.ttl -= 1);

        if self.spinner.active {
            self.spinner.update();
        }
        self.refresh().await?;
        Ok(())
    }

    pub async fn refresh(&mut self) -> AppResult<()> {
        let refreshed_controllers =
            Controller::get_all(self.session.clone(), &self.favorite_devices).await?;

        // Remove unplugged adapters in a single pass
        let mut adapter_removed = false;
        self.controllers.retain(|controller| {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…