diff options
Diffstat (limited to 'c/episodelistview.c')
-rw-r--r-- | c/episodelistview.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/c/episodelistview.c b/c/episodelistview.c index 76c99d9..5c9d8ba 100644 --- a/c/episodelistview.c +++ b/c/episodelistview.c @@ -117,20 +117,17 @@ ElvSelectRecent() term_t t; t = T(1); - P("track_episodes","most_recently_watched",1,t) { - iEpisode = 1; - goto sel; - } + iItem = 0; + P("track_episodes","most_recently_watched",1,t) goto s; GI(t,&iEpisode) return; -sel: lvfi.flags = LVFI_PARAM; + lvfi.flags = LVFI_PARAM; lvfi.lParam = iEpisode; iItem = ListView_FindItem(HElv, -1, &lvfi); if (iItem == -1) return; - if (iItem > 5) - ElvSetTop(iItem-5); +s: ElvSetTop(iItem > 5? iItem-5: 0); ListView_SetItemState(HElv, iItem, LVIS_SELECTED|LVIS_FOCUSED, LVIS_SELECTED|LVIS_FOCUSED); LpLviElvSelection->iItem = iItem; |