summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-06-14 12:03:19 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-06-14 12:03:19 -0700
commit0d986b9cfd400d774a540b80255d9cd53235cb5e (patch)
treeb58c6640be182bd137d4c5b0c0a47692b87d7f16 /mobile-widgets
parent3f26de826abc1faf066d89c01c200efef3dee715 (diff)
downloadsubsurface-0d986b9cfd400d774a540b80255d9cd53235cb5e.tar.gz
QML UI: show an empty dive list with explanation
If the credentials are valid we should show the dive list. If there are no dives, simply say so. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/DiveList.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml
index 223afdce4..e405bcb79 100644
--- a/mobile-widgets/qml/DiveList.qml
+++ b/mobile-widgets/qml/DiveList.qml
@@ -212,7 +212,7 @@ Kirigami.ScrollablePage {
ScrollView {
id: startPageWrapper
anchors.fill: parent
- opacity: credentialStatus === QMLManager.NOCLOUD || (diveListView.count > 0 && (credentialStatus === QMLManager.VALID || credentialStatus === QMLManager.VALID_EMAIL)) ? 0 : 1
+ opacity: credentialStatus === QMLManager.NOCLOUD || (credentialStatus === QMLManager.VALID || credentialStatus === QMLManager.VALID_EMAIL) ? 0 : 1
visible: opacity > 0
Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } }
onVisibleChanged: {
@@ -273,6 +273,11 @@ Kirigami.ScrollablePage {
}
}
+ Kirigami.Label {
+ text: qsTr("No dives in dive list")
+ visible: diveListView.visible && diveListView.count === 0
+ }
+
property QtObject addDiveAction: Action {
iconName: "list-add"
onTriggered: {