Skip to content

Commit

Permalink
QML UI: Scroll episode list when opening last item
Browse files Browse the repository at this point in the history
  • Loading branch information
thp committed Jul 10, 2012
1 parent 1c5b2b6 commit 5e205ec
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions share/gpodder/ui/qml/EpisodeList.qml
Expand Up @@ -43,6 +43,14 @@ Item {

ListView {
id: listView

onContentHeightChanged: {
if (count > 0 && openedIndex == count - 1 && !flicking && !moving) {
/* Scroll the "opening" item into view at the bottom */
listView.positionViewAtEnd();
}
}

anchors.fill: parent
property int openedIndex: -1
visible: count > 0
Expand Down

0 comments on commit 5e205ec

Please sign in to comment.