()
| 24 | use super::invoke::fetch_update; |
| 25 | |
| 26 | pub fn check_for_updates() { |
| 27 | tracing::info!("Checking for updates..."); |
| 28 | let modal_store = expect_context::<RwSignal<ModalStore>>(); |
| 29 | spawn_local(async move { |
| 30 | let update = fetch_update().await; |
| 31 | match update { |
| 32 | Ok(Some(update)) => { |
| 33 | modal_store.update(|m| m.set_active_modal(Modals::UpdateModal(update))); |
| 34 | } |
| 35 | Err(e) => tracing::error!("Failed to fetch update: {:?}", e), |
| 36 | _ => { |
| 37 | tracing::info!("No update found") |
| 38 | } |
| 39 | } |
| 40 | }); |
| 41 | } |
no test coverage detected