From c920d2346b39da89297aede673e9853829e181b3 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 23 Mar 2017 10:39:58 +0100 Subject: Show something if the data is not yet available. We're still missing: * For empty folders we have to differentiate between truly empty folder, and folders that have not been synchronized yet. Further an indicator when the fetch is in progress would be useful. * For mails we need to indicate when the mail is being fetched. --- components/package/contents/ui/ConversationView.qml | 17 ++++++++++++++++- components/package/contents/ui/MailListView.qml | 7 +++++++ 2 files changed, 23 insertions(+), 1 deletion(-) (limited to 'components/package/contents') diff --git a/components/package/contents/ui/ConversationView.qml b/components/package/contents/ui/ConversationView.qml index eedd446b..3f5976c2 100644 --- a/components/package/contents/ui/ConversationView.qml +++ b/components/package/contents/ui/ConversationView.qml @@ -189,7 +189,7 @@ Rectangle { Rectangle { id: sheet anchors.centerIn: parent - implicitHeight: header.height + attachments.height + body.height + footer.height + Kirigami.Units.largeSpacing + implicitHeight: header.height + attachments.height + body.height + incompleteBody.height + footer.height + Kirigami.Units.largeSpacing width: parent.width - Kirigami.Units.gridUnit * 2 //Overlay for non-active mails @@ -463,8 +463,23 @@ Rectangle { height: desiredHeight message: model.mimeMessage + visible: !model.incomplete } + Label { + id: incompleteBody + anchors { + top: header.bottom + left: header.left + right: header.right + leftMargin: Kirigami.Units.largeSpacing + rightMargin: Kirigami.Units.largeSpacing + topMargin: Math.max(attachments.height, Kirigami.Units.largeSpacing) + } + //TODO Change text if we're fetching the body + text: "Incomplete body..." + visible: model.incomplete + } Item { id: footer diff --git a/components/package/contents/ui/MailListView.qml b/components/package/contents/ui/MailListView.qml index 97c1a0d4..e6e69251 100644 --- a/components/package/contents/ui/MailListView.qml +++ b/components/package/contents/ui/MailListView.qml @@ -96,6 +96,13 @@ Item { placeholderText: qsTr("Filter...") } + Label { + anchors.top: searchBar.bottom + visible: listView.count === 0 + //TODO depending on whether we synchronized already or not the label should change. + text: "Nothing here..." + } + ListView { id: listView -- cgit v1.2.3