From f690c7dde14a6f9c5fbf04ed94170c7648591cb6 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Thu, 4 Apr 2013 20:58:57 +0200 Subject: store post position in database, create invisible items for unfetched --- qml/TopicPage.qml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'qml') diff --git a/qml/TopicPage.qml b/qml/TopicPage.qml index 689dce7..9835a06 100644 --- a/qml/TopicPage.qml +++ b/qml/TopicPage.qml @@ -36,6 +36,11 @@ Page { id: topicModel board: topicPage.board topicId: topicPage.topicId + + onFirstUnreadPostChanged: { + postsView.positionViewAtIndex(firstUnreadPost, ListView.Beginning); + topicModel.markAsRead(); + } } section.property: "humanDate" section.criteria: ViewSection.FullString @@ -56,9 +61,13 @@ Page { height: postItemColumn.height + UiConstants.DefaultMargin anchors.centerIn: parent + visible: model.postId >= 0 color: "white" radius: 20 + border.width: model.unread ? 2 : 0 + border.color: "black" + Column { id: postItemColumn anchors.left: parent.left -- cgit v1.2.3