mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-11-23 12:06:06 +01:00
Don't trigger language change when the language isn't actually changed
This commit is contained in:
parent
1c18ce4699
commit
75c0434ceb
@ -62,6 +62,7 @@ public class UISettingsTab extends AUITab {
|
|||||||
language.setSelectedItem(I18n.getCurrentLocale());
|
language.setSelectedItem(I18n.getCurrentLocale());
|
||||||
language.addActionListener(event -> {
|
language.addActionListener(event -> {
|
||||||
if (!(language.getSelectedItem() instanceof String locale)) return;
|
if (!(language.getSelectedItem() instanceof String locale)) return;
|
||||||
|
if (locale.equals(I18n.getCurrentLocale())) return;
|
||||||
I18n.setLocale(locale);
|
I18n.setLocale(locale);
|
||||||
ViaProxy.ui.showInfo(I18n.get("tab.ui_settings.language.success", I18n.get("language.name"), locale));
|
ViaProxy.ui.showInfo(I18n.get("tab.ui_settings.language.success", I18n.get("language.name"), locale));
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user