From a446313119b177bc7a6ba488f5186f58695fe444 Mon Sep 17 00:00:00 2001 From: kapodamy Date: Sun, 1 Sep 2019 18:49:45 -0300 Subject: [PATCH] add warning after toggle the SAF option --- .../schabi/newpipe/settings/DownloadSettingsFragment.java | 8 +++++++- app/src/main/res/values-es/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/DownloadSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/DownloadSettingsFragment.java index 7c2cb46e9..e161c8aa5 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/DownloadSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/DownloadSettingsFragment.java @@ -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; diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 028f146fc..e2e002d73 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -17,6 +17,7 @@ Carpeta de descarga de vídeo Ruta para almacenar los vídeos descargados Introducir directorio de descargas para vídeos + Cambie las carpetas de descarga para que tenga efecto Resolución por defecto de vídeo Reproducir con Kodi Aplicación Kore no encontrada. ¿Instalarla? diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1025b504b..d9ad3f5c3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -47,6 +47,7 @@ Audio download folder Downloaded audio is stored here Enter download path for audio files + Change the download folders to take effect Autoplay Plays a video when NewPipe is called from another app Default resolution