MCPcopy Create free account
hub / github.com/Moosync/Moosync / check_for_updates

Function check_for_updates

src/utils/window.rs:26–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24use super::invoke::fetch_update;
25
26pub 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}

Callers 1

AppFunction · 0.85

Calls 3

fetch_updateFunction · 0.85
UpdateModalFunction · 0.85
set_active_modalMethod · 0.80

Tested by

no test coverage detected