From 1aa144bf37a84dd19a3daa55cea0893ea1a29d15 Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Sat, 30 Jul 2022 19:17:38 +0200 Subject: [PATCH] 0.5.1 - updated core library; now you can delete voice packages from settings --- Cargo.toml | 2 +- anime-game-core | 2 +- src/ui/preferences/general_page.rs | 17 +++++++++++++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a4f27e7..f9cf85b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "anime-game-launcher" -version = "0.5.0" +version = "0.5.1" description = "Anime Game launcher" authors = ["Nikita Podvirnyy "] license = "GPL-3.0" diff --git a/anime-game-core b/anime-game-core index 33893a3..cc93b43 160000 --- a/anime-game-core +++ b/anime-game-core @@ -1 +1 @@ -Subproject commit 33893a336d4051e14ce6ed1da81a18910f0a82b0 +Subproject commit cc93b435dfa72de188168354395c36b60708fc31 diff --git a/src/ui/preferences/general_page.rs b/src/ui/preferences/general_page.rs index 28621ee..07ebfcf 100644 --- a/src/ui/preferences/general_page.rs +++ b/src/ui/preferences/general_page.rs @@ -329,8 +329,21 @@ impl App { let component = this.widgets.voieover_components[*i].clone(); if component.is_downloaded(&config.game.path) { - // TODO: VoicePackage::delete() - todo!(); + component.button.set_sensitive(false); + + let this = this.clone(); + + std::thread::spawn(move || { + if let Err(err) = component.package.delete_in(&config.game.path) { + this.update(Actions::ToastError(Rc::new(( + String::from("Failed to delete voiceover"), err + )))).unwrap(); + } + + component.button.set_sensitive(true); + + component.update_state(&config.game.path); + }); } else {