From ec48ea0cf01d306c0a9283e485f8c37d7d4d1ebd Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 16 Apr 2017 22:18:02 +0200 Subject: Hide trash from non-trash conversations. ...and indicate in the conversation view if a mail has been sent or is a draft. --- framework/src/domain/folderlistmodel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'framework/src/domain/folderlistmodel.cpp') diff --git a/framework/src/domain/folderlistmodel.cpp b/framework/src/domain/folderlistmodel.cpp index 14405beb..4437e75b 100644 --- a/framework/src/domain/folderlistmodel.cpp +++ b/framework/src/domain/folderlistmodel.cpp @@ -53,6 +53,7 @@ QHash< int, QByteArray > FolderListModel::roleNames() const roles[Id] = "id"; roles[DomainObject] = "domainObject"; roles[Status] = "status"; + roles[Trash] = "trash"; return roles; } @@ -81,6 +82,11 @@ QVariant FolderListModel::data(const QModelIndex &idx, int role) const } return NoStatus; } + case Trash: + if (folder) { + return folder->getSpecialPurpose().contains(Sink::ApplicationDomain::SpecialPurpose::Mail::trash); + } + return false; } return QSortFilterProxyModel::data(idx, role); } -- cgit v1.2.3