More fleshing out on how specifically game downloads will work (#1)

This commit is contained in:
quexeky
2024-10-19 17:35:26 +11:00
parent 27d0dcafc7
commit 23137dd049
2 changed files with 59 additions and 7 deletions

View File

@ -19,6 +19,7 @@ use serde::{Deserialize, Serialize};
use std::{
collections::HashMap, sync::{LazyLock, Mutex}
};
use std::sync::Arc;
use tauri_plugin_deep_link::DeepLinkExt;
use crate::db::DatabaseImpls;
use crate::downloads::game_download::GameDownload;
@ -46,7 +47,7 @@ pub struct AppState {
status: AppStatus,
user: Option<User>,
games: HashMap<String, Game>,
game_downloads: Vec<GameDownload>
game_downloads: Vec<Arc<GameDownload>>
}
#[tauri::command]
@ -109,7 +110,6 @@ pub fn run() {
// Library
fetch_library,
fetch_game,
// Downloads
])
.plugin(tauri_plugin_shell::init())
.setup(|app| {