summaryrefslogtreecommitdiff
path: root/vdrmanager/src/de
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2012-01-25 00:35:11 +0100
committerlado <herrlado@gmail.com>2012-01-25 00:35:11 +0100
commit1cb716ecb5bc0750715dc6bc9e069b84a1823b31 (patch)
tree70fa6ef0cddfaeb466a228e085e799228800e308 /vdrmanager/src/de
parentd9efb2dae533bffc8e4aa57e28118c97072ad923 (diff)
downloadvdr-manager-1cb716ecb5bc0750715dc6bc9e069b84a1823b31.tar.gz
vdr-manager-1cb716ecb5bc0750715dc6bc9e069b84a1823b31.tar.bz2
beter handling of recent channels
Diffstat (limited to 'vdrmanager/src/de')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java
index 766bb4d..4fca878 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java
@@ -264,6 +264,12 @@ public class ChannelListActivity extends
return true;
}
+ if(Preferences.get().getMaxRecentChannels() <= 0){
+ RECENT.clear();
+ say(R.string.recent_channels_no_history);
+ return true;
+ }
+
new AlertDialog.Builder(this)
.setAdapter(getRecentAdapter(), new DialogInterface.OnClickListener() {
@@ -370,6 +376,10 @@ public class ChannelListActivity extends
@Override
protected Void doInBackground(Void... arg0) {
+ int max = Preferences.get().getMaxRecentChannels();
+ if(max <= 0){
+ return null;
+ }
Iterator<Channel> i = RECENT.iterator();
while (i.hasNext()) {
Channel c = i.next();