summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2011-11-13 01:31:03 +0100
committerlado <herrlado@gmail.com>2011-11-13 01:31:03 +0100
commit2f217dac3b2ace6aa4a3f73f41a65d0df9f06993 (patch)
tree71b23f5757b4e5f2bcba52552dca609ce4ad724f
parentdde8f88fa98d488b65b5488312d1f54232584bcb (diff)
downloadvdr-manager-2f217dac3b2ace6aa4a3f73f41a65d0df9f06993.tar.gz
vdr-manager-2f217dac3b2ace6aa4a3f73f41a65d0df9f06993.tar.bz2
fix bug with channel epg
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/EventEpgListActivity.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EventEpgListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EventEpgListActivity.java
index 7264a77..1df7c29 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EventEpgListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EventEpgListActivity.java
@@ -105,13 +105,20 @@ public class EventEpgListActivity extends BaseTimerEditActivity<Epg> implements
if (event == SvdrpEvent.CACHE_HIT
|| event == SvdrpEvent.FINISHED_SUCCESS) {
ArrayList<Channel> channels = ChannelClient.getChannels();
+ currentChannel = getApp().getCurrentChannel();
+ boolean found = false;
+ int count = 0;
for (final Channel c : channels) {
channelSpinnerAdapter.add(c);
+ if(currentChannel != null && !found){
+ if(currentChannel.equals(c)){
+ found = true;
+ } else {
+ count++;
+ }
+ }
}
- currentChannel = getApp().getCurrentChannel();
- if(currentChannel != null){
- channelSpinner.setSelection(currentChannel.getNumber() - 1);
- }
+ channelSpinner.setSelection(count);
channelSpinner.setOnItemSelectedListener(EventEpgListActivity.this);
} else {
noConnection(event);