aboutsummaryrefslogtreecommitdiffstats
path: root/src/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/types.h')
-rw-r--r--src/types.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/types.h b/src/types.h
index e25c3a9..59d1d06 100644
--- a/src/types.h
+++ b/src/types.h
@@ -38,6 +38,13 @@ struct ThreadSummary
bool isDeleted() const { return tags.contains(QStringLiteral("deleted")); }
bool isSpam() const { return tags.contains(QStringLiteral("spam")); }
+ /// notmuch applies "attachment" itself while indexing, so this needs no
+ /// MIME parsing and no extra worker query: the tag is already in tags.
+ bool hasAttachment() const
+ {
+ return tags.contains(QStringLiteral("attachment"));
+ }
+
/// True while the thread is tagged for removal. notmuch deletes nothing
/// itself: the tag marks the thread for whatever the user's sync script
/// does next, so the row has to show it is on its way out.