refactor(download manager): Fully separate & generic download manager

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2025-01-02 12:16:17 +11:00
parent 6568faaf4f
commit cac612b176
15 changed files with 283 additions and 223 deletions

View File

@ -1,10 +1,10 @@
use std::sync::Mutex;
use crate::AppState;
use crate::{download_manager::downloadable_metadata::DownloadableMetadata, AppState};
#[tauri::command]
pub fn launch_game(
game_id: String,
game_id: DownloadableMetadata,
state: tauri::State<'_, Mutex<AppState>>,
) -> Result<(), String> {
let state_lock = state.lock().unwrap();
@ -20,7 +20,7 @@ pub fn launch_game(
#[tauri::command]
pub fn kill_game(
game_id: String,
game_id: DownloadableMetadata,
state: tauri::State<'_, Mutex<AppState>>,
) -> Result<(), String> {
let state_lock = state.lock().unwrap();