Game updates (#187)

* refactor: split umu launcher

* feat: latest version picker + fixes

* feat: frontend latest changes

* feat: game update detection w/ setting

* feat: fixes and refactor for game update

* fix: windows ui

* fix: deps

* feat: update modifications

* feat: missing ui and lock update

* fix: create install dir on init

* fix: clippy

* fix: clippy x2

* feat: add configuration option to toggle updates

* feat: uninstall dropdown on partiallyinstalled
This commit is contained in:
DecDuck
2026-02-25 23:27:30 +11:00
committed by GitHub
parent d7ec7fc25c
commit 82b9912bd0
38 changed files with 1193 additions and 573 deletions
+14 -21
View File
@@ -49,28 +49,21 @@ impl Middleware for AutoOfflineMiddleware {
match res {
Ok(res) => {
tauri::async_runtime::spawn(async move {
let lock = DROP_APP_HANDLE.try_lock();
if let Ok(lock) = lock {
if let Some(app_handle) = &*lock {
let state = app_handle.state::<std::sync::nonpoison::Mutex<AppState>>();
let state_lock = state.try_lock();
if let Ok(mut state_lock) = state_lock {
if state_lock.status == AppStatus::Offline {
state_lock.status = AppStatus::SignedIn;
app_handle
.emit("update_state", &*state_lock)
.expect("failed to emit state update");
}
} else {
warn!("failed to lock app state - {}", url.as_str());
let lock = DROP_APP_HANDLE.lock().await;
if let Some(app_handle) = &*lock {
let state = app_handle.state::<std::sync::nonpoison::Mutex<AppState>>();
let state_lock = state.try_lock();
if let Ok(mut state_lock) = state_lock {
if state_lock.status == AppStatus::Offline {
state_lock.status = AppStatus::SignedIn;
app_handle
.emit("update_state", &*state_lock)
.expect("failed to emit state update");
}
};
} else {
warn!(
"failed to lock app handle for offline/online middleware - {}",
url.as_str()
);
}
} else {
warn!("failed to lock app state - {}", url.as_str());
}
};
});
Ok(res)