fix toast on app language change
I forgot to change the key here when I renamed it
This commit is contained in:
parent
c5e6bb58bc
commit
55a138e8da
|
@ -68,7 +68,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
|
||||||
|
|
||||||
initialSelectedLocalization = org.schabi.newpipe.util.Localization.getPreferredLocalization(requireContext());
|
initialSelectedLocalization = org.schabi.newpipe.util.Localization.getPreferredLocalization(requireContext());
|
||||||
initialSelectedContentCountry = org.schabi.newpipe.util.Localization.getPreferredContentCountry(requireContext());
|
initialSelectedContentCountry = org.schabi.newpipe.util.Localization.getPreferredContentCountry(requireContext());
|
||||||
initialLanguage = androidx.preference.PreferenceManager.getDefaultSharedPreferences(getContext()).getString("newpipes_language_key", "en");
|
initialLanguage = PreferenceManager.getDefaultSharedPreferences(getContext()).getString("app_language_key", "en");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -130,7 +130,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
|
||||||
.getPreferredLocalization(requireContext());
|
.getPreferredLocalization(requireContext());
|
||||||
final ContentCountry selectedContentCountry = org.schabi.newpipe.util.Localization
|
final ContentCountry selectedContentCountry = org.schabi.newpipe.util.Localization
|
||||||
.getPreferredContentCountry(requireContext());
|
.getPreferredContentCountry(requireContext());
|
||||||
final String selectedLanguage = androidx.preference.PreferenceManager.getDefaultSharedPreferences(getContext()).getString("newpipes_language_key", "en");
|
final String selectedLanguage = PreferenceManager.getDefaultSharedPreferences(getContext()).getString("app_language_key", "en");
|
||||||
|
|
||||||
if (!selectedLocalization.equals(initialSelectedLocalization)
|
if (!selectedLocalization.equals(initialSelectedLocalization)
|
||||||
|| !selectedContentCountry.equals(initialSelectedContentCountry) || !selectedLanguage.equals(initialLanguage)) {
|
|| !selectedContentCountry.equals(initialSelectedContentCountry) || !selectedLanguage.equals(initialLanguage)) {
|
||||||
|
|
Loading…
Reference in New Issue