diff options
author | H. Lehmann <ByteHamster@users.noreply.github.com> | 2019-06-13 21:55:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-13 21:55:33 +0200 |
commit | 3331b663e144204ae21fe7cbba637baa907036b6 (patch) | |
tree | fedbea17537e90d72b1260f173f6de184355e18e /app/src/main/java/de/danoeh/antennapod/preferences | |
parent | 2949fe61b6f0f44686cceafa103b41becdb8ecc8 (diff) | |
parent | d2b3d5f220e5ff6f182f3c9839e86848e42b58b9 (diff) | |
download | AntennaPod-3331b663e144204ae21fe7cbba637baa907036b6.zip |
Merge pull request #3213 from fabolhak/add_episode_cache_summary
add pref_episode_cache_summary
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/preferences')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java index 7a8411158..fdc719ad2 100644 --- a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java +++ b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java @@ -464,15 +464,6 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc } } ); - ui.findPreference(UserPreferences.PREF_EPISODE_CACHE_SIZE) - .setOnPreferenceChangeListener( - (preference, o) -> { - if (o instanceof String) { - setEpisodeCacheSizeText(UserPreferences.readEpisodeCacheSize((String) o)); - } - return true; - } - ); } private void setupNetworkScreen() { @@ -695,7 +686,6 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc setParallelDownloadsText(UserPreferences.getParallelDownloads()); break; case R.xml.preferences_autodownload: - setEpisodeCacheSizeText(UserPreferences.getEpisodeCacheSize()); checkAutodownloadItemVisibility(UserPreferences.isEnableAutodownload()); break; case R.xml.preferences_storage: @@ -942,20 +932,6 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc ui.findPreference(UserPreferences.PREF_PARALLEL_DOWNLOADS).setSummary(s); } - private void setEpisodeCacheSizeText(int cacheSize) { - final Resources res = ui.getActivity().getResources(); - - String s; - if (cacheSize == res.getInteger( - R.integer.episode_cache_size_unlimited)) { - s = res.getString(R.string.pref_episode_cache_unlimited); - } else { - s = Integer.toString(cacheSize) - + res.getString(R.string.episodes_suffix); - } - ui.findPreference(UserPreferences.PREF_EPISODE_CACHE_SIZE).setSummary(s); - } - private void setDataFolderText() { File f = UserPreferences.getDataFolder(null); if (f != null) { |