Skip to content

Commit 35abb99

Browse files
committed
Only show toast on Android <13
1 parent 70416e7 commit 35abb99

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,13 @@ public void onDestroy() {
108108
if (!selectedLocalization.equals(initialSelectedLocalization)
109109
|| !selectedContentCountry.equals(initialSelectedContentCountry)
110110
|| !selectedLanguage.equals(initialLanguage)) {
111-
Toast.makeText(requireContext(), R.string.localization_changes_requires_app_restart,
112-
Toast.LENGTH_LONG).show();
113-
111+
if (Build.VERSION.SDK_INT < 33) {
112+
Toast.makeText(
113+
requireContext(),
114+
R.string.localization_changes_requires_app_restart,
115+
Toast.LENGTH_LONG
116+
).show();
117+
}
114118
NewPipe.setupLocalization(selectedLocalization, selectedContentCountry);
115119
}
116120
}

0 commit comments

Comments
 (0)