summaryrefslogtreecommitdiff
path: root/qml/tapasboard/ForumPage.qml
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-04-04 01:15:54 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-04-04 01:15:54 +0200
commit3c88a76b1be759d13097810877d6e990b3371726 (patch)
treedd5627700ef12be7c55d9f3ceda5a9575691a337 /qml/tapasboard/ForumPage.qml
parent723e0e7f37636379f76008582dca459490b845f4 (diff)
downloadtapasboard-3c88a76b1be759d13097810877d6e990b3371726.tar.gz
tapasboard-3c88a76b1be759d13097810877d6e990b3371726.zip
implement refresh action
Diffstat (limited to 'qml/tapasboard/ForumPage.qml')
-rw-r--r--qml/tapasboard/ForumPage.qml20
1 files changed, 18 insertions, 2 deletions
diff --git a/qml/tapasboard/ForumPage.qml b/qml/tapasboard/ForumPage.qml
index 18953cb..aed65a0 100644
--- a/qml/tapasboard/ForumPage.qml
+++ b/qml/tapasboard/ForumPage.qml
@@ -14,17 +14,26 @@ Page {
tools: ToolBarLayout {
ToolIcon {
- id: backToolIcon
platformIconId: "toolbar-back"
- anchors.left: parent.left
onClicked: pageStack.pop()
}
+ ToolIcon {
+ platformIconId: board.busy ? "toolbar-cancle" : "toolbar-refresh"
+ onClicked: {
+ if (board.busy) {
+ board.cancelAllActions();
+ } else {
+ forumModel.refresh();
+ }
+ }
+ }
}
ListView {
id: topicsView
anchors.fill: parent
model: ForumModel {
+ id: forumModel
board: forumPage.board
forumId: forumPage.forumId
}
@@ -66,4 +75,11 @@ Page {
ScrollDecorator {
flickableItem: topicsView
}
+
+ BusyIndicator {
+ anchors.centerIn: parent
+ platformStyle: BusyIndicatorStyle { size: "large" }
+ visible: topicsView.count == 0 && board.busy
+ running: visible
+ }
}