fix: fixed merging issues
This commit is contained in:
parent
898388e1b9
commit
008b8ce1b5
6 changed files with 61 additions and 49 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -82,8 +82,8 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "anime-launcher-sdk"
|
||||
version = "1.17.0"
|
||||
source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.17.0#a17a0824344d24bf02de00aee71967b028c176bb"
|
||||
version = "1.17.1"
|
||||
source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.17.1#017d0d164f7d8b16043d42a8be7187c21951faf0"
|
||||
dependencies = [
|
||||
"anime-game-core",
|
||||
"anyhow",
|
||||
|
|
|
@ -19,7 +19,7 @@ glib-build-tools = "0.20"
|
|||
|
||||
[dependencies.anime-launcher-sdk]
|
||||
git = "https://github.com/an-anime-team/anime-launcher-sdk"
|
||||
tag = "1.17.0"
|
||||
tag = "1.17.1"
|
||||
features = ["all", "star-rail", "star-rail-patch"]
|
||||
|
||||
# path = "../anime-launcher-sdk" # ! for dev purposes only
|
||||
|
|
|
@ -353,7 +353,7 @@ impl SimpleAsyncComponent for DefaultPathsApp {
|
|||
DefaultPathsAppMsg::Continue => {
|
||||
match self.update_config() {
|
||||
Ok(_) => {
|
||||
sender.output(Self::Output::ScrollToSelectVoiceovers);
|
||||
sender.output(Self::Output::ScrollToDownloadComponents);
|
||||
}
|
||||
|
||||
Err(err) => {
|
||||
|
|
|
@ -990,7 +990,11 @@ impl SimpleComponent for App {
|
|||
|
||||
// Update initial patch status
|
||||
|
||||
tasks.push(std::thread::spawn(clone!(@strong sender => move || {
|
||||
tasks.push(std::thread::spawn(clone!(
|
||||
#[strong]
|
||||
sender,
|
||||
|
||||
move || {
|
||||
// Get main patch status
|
||||
sender.input(AppMsg::SetMainPatch(match jadeite::get_metadata() {
|
||||
Ok(metadata) => {
|
||||
|
@ -1014,7 +1018,8 @@ impl SimpleComponent for App {
|
|||
}));
|
||||
|
||||
tracing::info!("Updated patch status");
|
||||
})));
|
||||
}
|
||||
)));
|
||||
|
||||
// Update initial game version status
|
||||
|
||||
|
@ -1089,13 +1094,13 @@ impl SimpleComponent for App {
|
|||
"locale" = locale.to_name()
|
||||
})))));
|
||||
}
|
||||
}
|
||||
|
||||
StateUpdating::Patch => {
|
||||
sender.input(AppMsg::SetLoadingStatus(Some(Some(tr!("loading-launcher-state--patch")))));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
let state = match LauncherState::get_from_config(updater) {
|
||||
|
|
|
@ -17,7 +17,11 @@ pub fn update_patch(sender: ComponentSender<App>, progress_bar_input: Sender<Pro
|
|||
|
||||
std::thread::spawn(move || {
|
||||
let result = jadeite::get_latest()
|
||||
.and_then(|patch| patch.install(config.patch.path, clone!(@strong sender => move |state| {
|
||||
.and_then(|patch| patch.install(config.patch.path, clone!(
|
||||
#[strong]
|
||||
sender,
|
||||
|
||||
move |state| {
|
||||
match &state {
|
||||
InstallerUpdate::DownloadingError(err) => {
|
||||
tracing::error!("Downloading failed: {err}");
|
||||
|
@ -43,7 +47,8 @@ pub fn update_patch(sender: ComponentSender<App>, progress_bar_input: Sender<Pro
|
|||
#[allow(unused_must_use)] {
|
||||
progress_bar_input.send(ProgressBarMsg::UpdateFromState(state.into()));
|
||||
}
|
||||
})));
|
||||
}
|
||||
)));
|
||||
|
||||
if let Err(err) = result {
|
||||
tracing::error!("Failed to download latest patch version");
|
||||
|
|
|
@ -22,6 +22,8 @@ pub mod components;
|
|||
|
||||
use components::*;
|
||||
|
||||
use crate::ui::preferences::main::PreferencesAppMsg;
|
||||
|
||||
use crate::i18n::*;
|
||||
use crate::*;
|
||||
|
||||
|
|
Loading…
Reference in a new issue