diff options
author | lado <herrlado@gmail.com> | 2011-11-13 01:31:03 +0100 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2011-11-13 01:31:03 +0100 |
commit | 2f217dac3b2ace6aa4a3f73f41a65d0df9f06993 (patch) | |
tree | 71b23f5757b4e5f2bcba52552dca609ce4ad724f /vdrmanager | |
parent | dde8f88fa98d488b65b5488312d1f54232584bcb (diff) | |
download | vdr-manager-2f217dac3b2ace6aa4a3f73f41a65d0df9f06993.tar.gz vdr-manager-2f217dac3b2ace6aa4a3f73f41a65d0df9f06993.tar.bz2 |
fix bug with channel epg
Diffstat (limited to 'vdrmanager')
-rw-r--r-- | vdrmanager/src/de/bjusystems/vdrmanager/gui/EventEpgListActivity.java | 15 |
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); |