summaryrefslogtreecommitdiff
path: root/vdrmanager/src/de
diff options
context:
space:
mode:
Diffstat (limited to 'vdrmanager/src/de')
-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);