Make the KioskFragment aware of changes in the preferred content country

This commit is contained in:
Mauricio Colli 2019-10-20 12:31:46 -03:00
parent 544cae4fb4
commit bc283bce4e
No known key found for this signature in database
GPG key ID: F200BFD6F29DDD85
2 changed files with 20 additions and 0 deletions

View file

@ -17,6 +17,7 @@ import com.nononsenseapps.filepicker.Utils;
import com.nostra13.universalimageloader.core.ImageLoader;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.localization.ContentCountry;
import org.schabi.newpipe.extractor.localization.Localization;
import org.schabi.newpipe.report.ErrorActivity;
@ -128,6 +129,8 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
if (!selectedLocalization.equals(initialSelectedLocalization)
|| !selectedContentCountry.equals(initialSelectedContentCountry)) {
Toast.makeText(requireContext(), R.string.localization_changes_requires_app_restart, Toast.LENGTH_LONG).show();
NewPipe.setupLocalization(selectedLocalization, selectedContentCountry);
}
}