add warning after toggle the SAF option
This commit is contained in:
parent
1a643126de
commit
a446313119
|
@ -12,6 +12,7 @@ import android.support.annotation.Nullable;
|
|||
import android.support.annotation.StringRes;
|
||||
import android.support.v7.preference.Preference;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.nononsenseapps.filepicker.Utils;
|
||||
|
||||
|
@ -34,6 +35,7 @@ public class DownloadSettingsFragment extends BasePreferenceFragment {
|
|||
|
||||
private String DOWNLOAD_PATH_VIDEO_PREFERENCE;
|
||||
private String DOWNLOAD_PATH_AUDIO_PREFERENCE;
|
||||
private String STORAGE_USE_SAF_PREFERENCE;
|
||||
|
||||
private Preference prefPathVideo;
|
||||
private Preference prefPathAudio;
|
||||
|
@ -47,6 +49,7 @@ public class DownloadSettingsFragment extends BasePreferenceFragment {
|
|||
|
||||
DOWNLOAD_PATH_VIDEO_PREFERENCE = getString(R.string.download_path_video_key);
|
||||
DOWNLOAD_PATH_AUDIO_PREFERENCE = getString(R.string.download_path_audio_key);
|
||||
STORAGE_USE_SAF_PREFERENCE = getString(R.string.storage_use_saf);
|
||||
final String downloadStorageAsk = getString(R.string.downloads_storage_ask);
|
||||
|
||||
prefPathVideo = findPreference(DOWNLOAD_PATH_VIDEO_PREFERENCE);
|
||||
|
@ -169,7 +172,10 @@ public class DownloadSettingsFragment extends BasePreferenceFragment {
|
|||
String key = preference.getKey();
|
||||
int request;
|
||||
|
||||
if (key.equals(DOWNLOAD_PATH_VIDEO_PREFERENCE)) {
|
||||
if (key.equals(STORAGE_USE_SAF_PREFERENCE)) {
|
||||
Toast.makeText(getContext(), R.string.download_choose_new_path, Toast.LENGTH_LONG).show();
|
||||
return true;
|
||||
} else if (key.equals(DOWNLOAD_PATH_VIDEO_PREFERENCE)) {
|
||||
request = REQUEST_DOWNLOAD_VIDEO_PATH;
|
||||
} else if (key.equals(DOWNLOAD_PATH_AUDIO_PREFERENCE)) {
|
||||
request = REQUEST_DOWNLOAD_AUDIO_PATH;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
<string name="download_path_title">Carpeta de descarga de vídeo</string>
|
||||
<string name="download_path_summary">Ruta para almacenar los vídeos descargados</string>
|
||||
<string name="download_path_dialog_title">Introducir directorio de descargas para vídeos</string>
|
||||
<string name="download_choose_new_path">Cambie las carpetas de descarga para que tenga efecto</string>
|
||||
<string name="default_resolution_title">Resolución por defecto de vídeo</string>
|
||||
<string name="play_with_kodi_title">Reproducir con Kodi</string>
|
||||
<string name="kore_not_found">Aplicación Kore no encontrada. ¿Instalarla?</string>
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
<string name="download_path_audio_title">Audio download folder</string>
|
||||
<string name="download_path_audio_summary">Downloaded audio is stored here</string>
|
||||
<string name="download_path_audio_dialog_title">Enter download path for audio files</string>
|
||||
<string name="download_choose_new_path">Change the download folders to take effect</string>
|
||||
<string name="autoplay_by_calling_app_title">Autoplay</string>
|
||||
<string name="autoplay_by_calling_app_summary">Plays a video when NewPipe is called from another app</string>
|
||||
<string name="default_resolution_title">Default resolution</string>
|
||||
|
|
Loading…
Reference in New Issue