Spawn a fast animation ticker (~7 fps) and store the handle on the app.
(app: &mut App, tx: mpsc::UnboundedSender<Event>)
| 1299 | |
| 1300 | /// Spawn a fast animation ticker (~7 fps) and store the handle on the app. |
| 1301 | fn start_anim_ticker(app: &mut App, tx: mpsc::UnboundedSender<Event>) { |
| 1302 | let anim_tx = tx; |
| 1303 | app.anim_handle = Some(tokio::spawn(async move { |
| 1304 | loop { |
| 1305 | tokio::time::sleep(Duration::from_millis(140)).await; |
| 1306 | if anim_tx.send(Event::Redraw).is_err() { |
| 1307 | break; |
| 1308 | } |
| 1309 | } |
| 1310 | })); |
| 1311 | } |
| 1312 | |
| 1313 | // --------------------------------------------------------------------------- |
| 1314 | // Create sandbox (simplified — uses pre-selected provider names) |