summaryrefslogtreecommitdiff
path: root/qml
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-04-04 20:58:57 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-04-04 20:58:57 +0200
commitf690c7dde14a6f9c5fbf04ed94170c7648591cb6 (patch)
tree6e63dac978af3864622d0a9f85dac07f24318930 /qml
parent256e7837ce8cb30b0c0a8c73306abdffa80365a6 (diff)
downloadtapasboard-f690c7dde14a6f9c5fbf04ed94170c7648591cb6.tar.gz
tapasboard-f690c7dde14a6f9c5fbf04ed94170c7648591cb6.zip
store post position in database, create invisible items for unfetched
Diffstat (limited to 'qml')
-rw-r--r--qml/TopicPage.qml9
1 files changed, 9 insertions, 0 deletions
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