From 285195954efc59c720b1efd495318630b0c5030e Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Sat, 8 Apr 2023 22:45:38 +0200 Subject: [PATCH] fix: fixed game edition changing on switcher change --- CHANGELOG.md | 1 + src/ui/about.rs | 1 + src/ui/preferences/general.rs | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54f6bf2..c34c032 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added installation migration feature - Added game environment switcher - Added game edition switcher +- Added changelog to updated components toast ### Changed diff --git a/src/ui/about.rs b/src/ui/about.rs index a255108..f255a6d 100644 --- a/src/ui/about.rs +++ b/src/ui/about.rs @@ -87,6 +87,7 @@ impl SimpleComponent for AboutDialog { "
  • Added installation migration feature
  • ", "
  • Added game environment switcher
  • ", "
  • Added game edition switcher
  • ", + "
  • Added changelog to updated components toast
  • ", "", "

    Changed

    ", diff --git a/src/ui/preferences/general.rs b/src/ui/preferences/general.rs index 6c65836..a59a3ac 100644 --- a/src/ui/preferences/general.rs +++ b/src/ui/preferences/general.rs @@ -17,6 +17,7 @@ use anime_launcher_sdk::components::*; use anime_launcher_sdk::components::wine::WincompatlibWine; use anime_launcher_sdk::env_emulation::Environment; use anime_launcher_sdk::config::launcher::GameEdition; +use anime_launcher_sdk::anime_game_core::genshin::consts::GameEdition as CoreGameEdition; use super::main::PreferencesAppMsg; use crate::ui::migrate_installation::MigrateInstallationApp; @@ -326,6 +327,9 @@ impl SimpleAsyncComponent for GeneralApp { _ => unreachable!() }; + // Select new game edition + CoreGameEdition::from(config.launcher.edition).select(); + config::update(config); sender.output(PreferencesAppMsg::UpdateLauncherState);