mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-02-18 08:12:16 +03:00
fix: fixed (?) error on deleting non-installed voice package
I didn't test this but I think it should work lol
This commit is contained in:
parent
8935e566d9
commit
a3aad7a2f4
1 changed files with 17 additions and 11 deletions
|
@ -626,6 +626,7 @@ impl SimpleAsyncComponent for GeneralApp {
|
||||||
|
|
||||||
let package = VoicePackage::with_locale(package.locale).unwrap();
|
let package = VoicePackage::with_locale(package.locale).unwrap();
|
||||||
|
|
||||||
|
if !package.is_installed_in(&config.game.path) {
|
||||||
std::thread::spawn(move || {
|
std::thread::spawn(move || {
|
||||||
if let Err(err) = package.delete_in(&config.game.path) {
|
if let Err(err) = package.delete_in(&config.game.path) {
|
||||||
tracing::error!("Failed to delete voice package: {:?}", package.locale());
|
tracing::error!("Failed to delete voice package: {:?}", package.locale());
|
||||||
|
@ -640,6 +641,11 @@ impl SimpleAsyncComponent for GeneralApp {
|
||||||
sender.output(PreferencesAppMsg::UpdateLauncherState);
|
sender.output(PreferencesAppMsg::UpdateLauncherState);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
sender.input(GeneralAppMsg::SetVoicePackageSensitivity(index, true));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue