diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-03 17:20:55 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-03 17:20:55 +0200 |
| commit | fc815cb05c980161cb7e32c6421060a44e71c228 (patch) | |
| tree | 305c0e3d8af9905a06c95d8d72428e6665991721 /src/types.h | |
| parent | 7f505624b1f385a89c9ff32e15f4d4e68595e5b8 (diff) | |
| parent | abed584d02fdd89a22b37ef3da0b41f8d77f48b8 (diff) | |
| download | qtmaildir-fc815cb05c980161cb7e32c6421060a44e71c228.tar.gz qtmaildir-fc815cb05c980161cb7e32c6421060a44e71c228.zip | |
Merge branch 'feature/attachments'
Attachments become reachable: a paperclip column marks the threads that
carry one, and the message pane's attachment bar, an empty placeholder
since it was written, now lists them with save and save-all.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/types.h')
| -rw-r--r-- | src/types.h | 7 |
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. |
