fix: fixed merging issues

This commit is contained in:
Observer KRypt0n_ 2023-05-24 23:04:11 +02:00
parent 8d892b1e51
commit 6606100f36
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
4 changed files with 16 additions and 33 deletions

8
Cargo.lock generated
View file

@ -48,8 +48,8 @@ dependencies = [
[[package]]
name = "anime-game-core"
version = "1.10.3"
source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.10.3#045a5442a8d4d15326abbd3c294ec934603947d1"
version = "1.10.4"
source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.10.4#c7362e4864e2033bf29ff6a869471258a087c4d7"
dependencies = [
"anyhow",
"bzip2",
@ -73,8 +73,8 @@ dependencies = [
[[package]]
name = "anime-launcher-sdk"
version = "1.4.5"
source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.4.5#af03ab65d4350b35711d9ce118702844f79daf9e"
version = "1.4.6"
source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.4.6#828fb17a31eb505610bf47b0f4f049b78b753fcb"
dependencies = [
"anime-game-core",
"anyhow",

View file

@ -17,8 +17,8 @@ glib-build-tools = "0.17"
[dependencies.anime-launcher-sdk]
git = "https://github.com/an-anime-team/anime-launcher-sdk"
tag = "1.4.5"
features = ["all", "genshin"]
tag = "1.4.6"
features = ["all", "star-rail"]
# path = "../anime-launcher-sdk" # ! for dev purposes only

View file

@ -361,26 +361,20 @@ impl SimpleComponent for App {
Some(LauncherState::Launch) |
Some(LauncherState::PredownloadAvailable { .. }) => "media-playback-start-symbolic",
Some(LauncherState::FolderMigrationRequired { .. }) |
Some(LauncherState::WineNotInstalled) |
Some(LauncherState::PrefixNotExists) => "document-save-symbolic",
Some(LauncherState::GameUpdateAvailable(_)) |
Some(LauncherState::GameNotInstalled(_)) |
Some(LauncherState::VoiceUpdateAvailable(_)) |
Some(LauncherState::VoiceNotInstalled(_)) => "document-save-symbolic",
Some(LauncherState::GameNotInstalled(_)) => "document-save-symbolic",
Some(LauncherState::UnityPlayerPatchAvailable(UnityPlayerPatch { status, .. })) |
Some(LauncherState::XluaPatchAvailable(XluaPatch { status, .. })) => match status {
Some(LauncherState::MainPatchAvailable(MainPatch { status, .. })) => match status {
PatchStatus::NotAvailable |
PatchStatus::Outdated { .. } |
PatchStatus::Preparation { .. } => "window-close-symbolic",
PatchStatus::Outdated { .. } => "window-close-symbolic",
PatchStatus::Testing { .. } |
PatchStatus::Available { .. } => "document-save-symbolic"
}
Some(LauncherState::VoiceOutdated(_)) |
Some(LauncherState::GameOutdated(_)) |
None => "window-close-symbolic"
},
@ -390,18 +384,13 @@ impl SimpleComponent for App {
Some(LauncherState::Launch) |
Some(LauncherState::PredownloadAvailable { .. }) => tr("launch"),
Some(LauncherState::FolderMigrationRequired { .. }) => tr("migrate-folders"),
Some(LauncherState::UnityPlayerPatchAvailable(_)) |
Some(LauncherState::XluaPatchAvailable(_)) => tr("apply-patch"),
Some(LauncherState::MainPatchAvailable(_)) => tr("apply-patch"),
Some(LauncherState::WineNotInstalled) => tr("download-wine"),
Some(LauncherState::PrefixNotExists) => tr("create-prefix"),
Some(LauncherState::GameUpdateAvailable(diff)) |
Some(LauncherState::GameOutdated(diff)) |
Some(LauncherState::VoiceUpdateAvailable(diff)) |
Some(LauncherState::VoiceOutdated(diff)) => {
Some(LauncherState::GameOutdated(diff)) => {
match (Config::get(), diff.file_name()) {
(Ok(config), Some(filename)) => {
let temp = config.launcher.temp.unwrap_or_else(std::env::temp_dir);
@ -419,8 +408,7 @@ impl SimpleComponent for App {
}
},
Some(LauncherState::GameNotInstalled(_)) |
Some(LauncherState::VoiceNotInstalled(_)) => tr("download"),
Some(LauncherState::GameNotInstalled(_)) => tr("download"),
None => String::from("...")
}
@ -796,7 +784,7 @@ impl SimpleComponent for App {
}
// Get the main patch status
sender.input(AppMsg::SetMainPatch(match patch.main_patch(CONFIG.launcher.edition) {
sender.input(AppMsg::SetMainPatch(match patch.main_patch() {
Ok(patch) => Some(patch),
Err(err) => {

View file

@ -15,6 +15,7 @@ use anime_launcher_sdk::star_rail::config::schema::launcher::LauncherStyle;
pub mod components;
use components::*;
use super::main::PreferencesAppMsg;
use crate::ui::migrate_installation::MigrateInstallationApp;
@ -43,14 +44,6 @@ pub enum GeneralAppMsg {
/// was retrieved from remote repos
SetMainPatch(Option<MainPatch>),
OpenMigrateInstallation,
WineOpen(&'static [&'static str]),
UpdateLauncherStyle(LauncherStyle),
WineRecommendedOnly(bool),
DxvkRecommendedOnly(bool),
UpdateDownloadedWine,
UpdateDownloadedDxvk,
@ -499,6 +492,8 @@ impl SimpleAsyncComponent for GeneralApp {
languages: SUPPORTED_LANGUAGES.iter().map(|lang| tr(format_lang(lang).as_str())).collect()
};
let components_page = model.components_page.widget();
let widgets = view_output!();
AsyncComponentParts { model, widgets }