From d42992cb5766348cd3731aef7e5f9546c55c2fa0 Mon Sep 17 00:00:00 2001 From: Alberto Mardegan Date: Wed, 4 May 2016 23:33:41 +0300 Subject: [PATCH] [ubuntu] Avoid slow transition to opened article Fixes: https://github.com/mardy/ttrss/issues/10 --- qml/ttrss/ubuntu-touch/FeedItemSwipe.qml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/qml/ttrss/ubuntu-touch/FeedItemSwipe.qml b/qml/ttrss/ubuntu-touch/FeedItemSwipe.qml index e078b63..d349efa 100644 --- a/qml/ttrss/ubuntu-touch/FeedItemSwipe.qml +++ b/qml/ttrss/ubuntu-touch/FeedItemSwipe.qml @@ -16,7 +16,7 @@ Page { id: root property bool isCat: false - property var model + property alias model: listView.model property int currentIndex: -1 property alias currentItem: listView.currentItem @@ -45,7 +45,7 @@ Page { anchors.fill: parent orientation: ListView.Horizontal snapMode: ListView.SnapOneItem - highlightFollowsCurrentItem: false + highlightFollowsCurrentItem: true highlightRangeMode: ListView.StrictlyEnforceRange delegate: FeedItem { @@ -73,11 +73,9 @@ Page { } Component.onCompleted: { - /* For some reason, unless this is done here, the ListView would - * instantiate all the delegates when the page is first shown. */ - listView.model = root.model + /* We don't use an alias on the current index, in order to perform the + * autoread action when the index changes. */ listView.currentIndex = root.currentIndex - listView.highlightFollowsCurrentItem = true } Timer {