summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/PodcastApp.java
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2012-08-19 16:27:37 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2012-08-19 16:27:37 +0200
commit9513099a10b44e5570505910764f9a1a71f2b14c (patch)
treebc1382c8d5f35187975ba0eaccae24490cb569c6 /src/de/danoeh/antennapod/PodcastApp.java
parentc77247126892152caf644b34150244cb2cdb7d25 (diff)
downloadAntennaPod-9513099a10b44e5570505910764f9a1a71f2b14c.zip
Itemlists were not updating their content properly if "Display only
episodes'-preference was enabled
Diffstat (limited to 'src/de/danoeh/antennapod/PodcastApp.java')
-rw-r--r--src/de/danoeh/antennapod/PodcastApp.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/de/danoeh/antennapod/PodcastApp.java b/src/de/danoeh/antennapod/PodcastApp.java
index 0d2f0e253..414e6b3ba 100644
--- a/src/de/danoeh/antennapod/PodcastApp.java
+++ b/src/de/danoeh/antennapod/PodcastApp.java
@@ -37,6 +37,8 @@ public class PodcastApp extends Application implements
private static float LOGICAL_DENSITY;
private static PodcastApp singleton;
+
+ private boolean displayOnlyEpisodes;
public static PodcastApp getInstance() {
return singleton;
@@ -49,6 +51,7 @@ public class PodcastApp extends Application implements
LOGICAL_DENSITY = getResources().getDisplayMetrics().density;
SharedPreferences prefs = PreferenceManager
.getDefaultSharedPreferences(this);
+ displayOnlyEpisodes = prefs.getBoolean(PREF_DISPLAY_ONLY_EPISODES, false);
createImportDirectory();
createNoMediaFile();
prefs.registerOnSharedPreferenceChangeListener(this);
@@ -124,12 +127,19 @@ public class PodcastApp extends Application implements
if (AppConfig.DEBUG)
Log.d(TAG, "Automatic update was deactivated");
}
+ } else if (key.equals(PREF_DISPLAY_ONLY_EPISODES)) {
+ if (AppConfig.DEBUG) Log.d(TAG, "PREF_DISPLAY_ONLY_EPISODES changed");
+ displayOnlyEpisodes = sharedPreferences.getBoolean(PREF_DISPLAY_ONLY_EPISODES, false);
}
}
public static float getLogicalDensity() {
return LOGICAL_DENSITY;
}
+
+ public boolean displayOnlyEpisodes() {
+ return displayOnlyEpisodes;
+ }
public boolean isLargeScreen() {
return (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_LARGE || (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE;