feat(game): game uninstalling & partial compat

This commit is contained in:
DecDuck
2024-12-26 11:59:26 +11:00
parent 9ea2aa4997
commit dd7f5675d8
26 changed files with 469 additions and 96 deletions

View File

@ -199,8 +199,10 @@ pub fn retry_connect(state: tauri::State<'_, Mutex<AppState>>) -> Result<(), ()>
pub fn setup() -> Result<(AppStatus, Option<User>), ()> {
let data = DB.borrow_data().unwrap();
let auth = data.auth.clone();
drop(data);
if data.auth.is_some() {
if auth.is_some() {
let user_result = fetch_user();
if user_result.is_err() {
let error = user_result.err().unwrap();
@ -215,7 +217,5 @@ pub fn setup() -> Result<(AppStatus, Option<User>), ()> {
return Ok((AppStatus::SignedIn, Some(user_result.unwrap())));
}
drop(data);
Ok((AppStatus::SignedOut, None))
}