mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-23 17:20:04 +02:00
Fix a crash when changing language
This commit is contained in:
parent
295243d781
commit
1cf3519951
1 changed files with 2 additions and 1 deletions
|
@ -55,7 +55,8 @@ public class FragmentLanguageSettings extends PreferenceFragmentCompat implement
|
||||||
@Override
|
@Override
|
||||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
||||||
if (key.compareToIgnoreCase(getString(R.string.SET_DEFAULT_LOCALE_NEW)) == 0 || key.compareToIgnoreCase(getString(R.string.SET_TRANSLATE_VALUES_RESET)) == 0) {
|
if (key.compareToIgnoreCase(getString(R.string.SET_DEFAULT_LOCALE_NEW)) == 0 || key.compareToIgnoreCase(getString(R.string.SET_TRANSLATE_VALUES_RESET)) == 0) {
|
||||||
requireActivity().recreate();
|
requireActivity().finish();
|
||||||
|
startActivity(requireActivity().getIntent());
|
||||||
Helper.recreateMainActivity(requireActivity());
|
Helper.recreateMainActivity(requireActivity());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue