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. --- framework/domain/maillistmodel.cpp | 3 +++ framework/domain/maillistmodel.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'framework/domain') 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 roles[DomainObject] = "domainObject"; roles[ThreadSize] = "threadSize"; roles[Mail] = "mail"; + roles[Incomplete] = "incomplete"; return roles; } @@ -134,6 +135,8 @@ QVariant MailListModel::data(const QModelIndex &idx, int role) const return mail->getProperty("count").toInt(); case Mail: return QVariant::fromValue(mail); + case Incomplete: + return !mail->getFullPayloadAvailable(); } return QSortFilterProxyModel::data(idx, role); } 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: MimeMessage, DomainObject, ThreadSize, - Mail + Mail, + Incomplete }; QHash roleNames() const Q_DECL_OVERRIDE; -- cgit v1.2.3