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

Fix language settings dropdown not updating when changing language in first run setup

This commit is contained in:
Joseph Madamba 2022-10-06 21:11:00 -07:00
parent 4980e53c9c
commit b27e70ca47

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());
}