1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 13:32:54 +08:00

Fix language dropdown in settings not updating after changing language in first run dialog

Closes #21744.
This commit is contained in:
Dean Herbert 2022-12-21 16:31:53 +08:00
parent d81a724dd7
commit 19f66c806e

View File

@ -44,10 +44,13 @@ namespace osu.Game.Overlays.Settings.Sections.General
},
};
localisationParameters.BindValueChanged(p
=> languageSelection.Current.Value = LanguageExtensions.GetLanguageFor(frameworkLocale.Value, p.NewValue), true);
frameworkLocale.BindValueChanged(_ => updateSelection());
localisationParameters.BindValueChanged(_ => updateSelection(), true);
languageSelection.Current.BindValueChanged(val => frameworkLocale.Value = val.NewValue.ToCultureCode());
}
private void updateSelection() =>
languageSelection.Current.Value = LanguageExtensions.GetLanguageFor(frameworkLocale.Value, localisationParameters.Value);
}
}