diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-04-04 01:15:54 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-04-04 01:15:54 +0200 |
commit | 3c88a76b1be759d13097810877d6e990b3371726 (patch) | |
tree | dd5627700ef12be7c55d9f3ceda5a9575691a337 /qml/tapasboard/TopicPage.qml | |
parent | 723e0e7f37636379f76008582dca459490b845f4 (diff) | |
download | tapasboard-3c88a76b1be759d13097810877d6e990b3371726.tar.gz tapasboard-3c88a76b1be759d13097810877d6e990b3371726.zip |
implement refresh action
Diffstat (limited to 'qml/tapasboard/TopicPage.qml')
-rw-r--r-- | qml/tapasboard/TopicPage.qml | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/qml/tapasboard/TopicPage.qml b/qml/tapasboard/TopicPage.qml index ba132b5..689dce7 100644 --- a/qml/tapasboard/TopicPage.qml +++ b/qml/tapasboard/TopicPage.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 { + topicModel.refresh(); + } + } + } } ListView { id: postsView anchors.fill: parent model: TopicModel { + id: topicModel board: topicPage.board topicId: topicPage.topicId } @@ -103,4 +112,11 @@ Page { ScrollDecorator { flickableItem: postsView } + + BusyIndicator { + anchors.centerIn: parent + platformStyle: BusyIndicatorStyle { size: "large" } + visible: postsView.count == 0 && board.busy + running: visible + } } |