1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Merge pull request #20599 from Joehuu/fix-language-dropdown-not-updating

Fix language settings dropdown not updating when changing language in first run setup
This commit is contained in:
Dean Herbert 2022-10-07 13:54:52 +09:00 committed by GitHub
commit da51475298
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,9 +44,12 @@ namespace osu.Game.Overlays.Settings.Sections.General
},
};
if (!LanguageExtensions.TryParseCultureCode(frameworkLocale.Value, out var locale))
locale = Language.en;
languageSelection.Current.Value = locale;
frameworkLocale.BindValueChanged(locale =>
{
if (!LanguageExtensions.TryParseCultureCode(locale.NewValue, out var language))
language = Language.en;
languageSelection.Current.Value = language;
}, true);
languageSelection.Current.BindValueChanged(val => frameworkLocale.Value = val.NewValue.ToCultureCode());
}