diff options
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 + } } |