summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/package/contents/ui/ConversationView.qml17
-rw-r--r--components/package/contents/ui/MailListView.qml7
-rw-r--r--framework/domain/maillistmodel.cpp3
-rw-r--r--framework/domain/maillistmodel.h3
4 files changed, 28 insertions, 2 deletions
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 {
189 Rectangle { 189 Rectangle {
190 id: sheet 190 id: sheet
191 anchors.centerIn: parent 191 anchors.centerIn: parent
192 implicitHeight: header.height + attachments.height + body.height + footer.height + Kirigami.Units.largeSpacing 192 implicitHeight: header.height + attachments.height + body.height + incompleteBody.height + footer.height + Kirigami.Units.largeSpacing
193 width: parent.width - Kirigami.Units.gridUnit * 2 193 width: parent.width - Kirigami.Units.gridUnit * 2
194 194
195 //Overlay for non-active mails 195 //Overlay for non-active mails
@@ -463,8 +463,23 @@ Rectangle {
463 height: desiredHeight 463 height: desiredHeight
464 464
465 message: model.mimeMessage 465 message: model.mimeMessage
466 visible: !model.incomplete
466 } 467 }
467 468
469 Label {
470 id: incompleteBody
471 anchors {
472 top: header.bottom
473 left: header.left
474 right: header.right
475 leftMargin: Kirigami.Units.largeSpacing
476 rightMargin: Kirigami.Units.largeSpacing
477 topMargin: Math.max(attachments.height, Kirigami.Units.largeSpacing)
478 }
479 //TODO Change text if we're fetching the body
480 text: "Incomplete body..."
481 visible: model.incomplete
482 }
468 Item { 483 Item {
469 id: footer 484 id: footer
470 485
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 {
96 placeholderText: qsTr("Filter...") 96 placeholderText: qsTr("Filter...")
97 } 97 }
98 98
99 Label {
100 anchors.top: searchBar.bottom
101 visible: listView.count === 0
102 //TODO depending on whether we synchronized already or not the label should change.
103 text: "Nothing here..."
104 }
105
99 ListView { 106 ListView {
100 id: listView 107 id: listView
101 108
diff --git a/framework/domain/maillistmodel.cpp b/framework/domain/maillistmodel.cpp
index 5a462021..bdf7b9f5 100644
--- a/framework/domain/maillistmodel.cpp
+++ b/framework/domain/maillistmodel.cpp
@@ -66,6 +66,7 @@ QHash< int, QByteArray > MailListModel::roleNames() const
66 roles[DomainObject] = "domainObject"; 66 roles[DomainObject] = "domainObject";
67 roles[ThreadSize] = "threadSize"; 67 roles[ThreadSize] = "threadSize";
68 roles[Mail] = "mail"; 68 roles[Mail] = "mail";
69 roles[Incomplete] = "incomplete";
69 70
70 return roles; 71 return roles;
71} 72}
@@ -134,6 +135,8 @@ QVariant MailListModel::data(const QModelIndex &idx, int role) const
134 return mail->getProperty("count").toInt(); 135 return mail->getProperty("count").toInt();
135 case Mail: 136 case Mail:
136 return QVariant::fromValue(mail); 137 return QVariant::fromValue(mail);
138 case Incomplete:
139 return !mail->getFullPayloadAvailable();
137 } 140 }
138 return QSortFilterProxyModel::data(idx, role); 141 return QSortFilterProxyModel::data(idx, role);
139} 142}
diff --git a/framework/domain/maillistmodel.h b/framework/domain/maillistmodel.h
index 316ff4c6..8f61fce6 100644
--- a/framework/domain/maillistmodel.h
+++ b/framework/domain/maillistmodel.h
@@ -58,7 +58,8 @@ public:
58 MimeMessage, 58 MimeMessage,
59 DomainObject, 59 DomainObject,
60 ThreadSize, 60 ThreadSize,
61 Mail 61 Mail,
62 Incomplete
62 }; 63 };
63 64
64 QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE; 65 QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;