From 1cb716ecb5bc0750715dc6bc9e069b84a1823b31 Mon Sep 17 00:00:00 2001 From: lado Date: Wed, 25 Jan 2012 00:35:11 +0100 Subject: beter handling of recent channels --- .../src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'vdrmanager/src/de/bjusystems') 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 i = RECENT.iterator(); while (i.hasNext()) { Channel c = i.next(); -- cgit v1.2.3