diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-03 14:57:11 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-03 14:57:11 +0200 |
| commit | 1371a3901857a8d2ac4fcf235fb29e7caaf63cae (patch) | |
| tree | ef8c08db29a7ce6b4052e6533c4f66b8f5a258bf /src/types.h | |
| parent | 95d0d19a4c1323a4839c1544f3bc1c0323f85dd9 (diff) | |
| download | qtmaildir-1371a3901857a8d2ac4fcf235fb29e7caaf63cae.tar.gz qtmaildir-1371a3901857a8d2ac4fcf235fb29e7caaf63cae.zip | |
feat: show that a tag action landed
Selecting a thread and hitting Delete changed nothing on screen, so
there was no way to tell the action had stuck.
The tag was always applied: applyTagChange() emitted dataChanged across
the row, and the Tags column did update. But Subject was set to stretch
while Tags came after it, so Subject took all free width and pushed Tags
out of view. The feedback lived in the one column that could not be seen.
Columns are now Tags, Date, From, Subject, with Subject stretching last
so nothing can be pushed off the right edge. A thread tagged deleted or
spam fills its whole row, muted red or orange with white struck-through
text, through the background, foreground and font roles, so no cue
depends on one column remaining visible.
Strike-through accompanies the fill on purpose: it survives a theme that
overrides backgrounds and reads without colour. Bold for unread still
composes with it.
Archive adds no tag, so an archived row is left unstyled for now.
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 2de6129..e25c3a9 100644 --- a/src/types.h +++ b/src/types.h @@ -35,6 +35,13 @@ struct ThreadSummary bool isUnread() const { return tags.contains(QStringLiteral("unread")); } bool isFlagged() const { return tags.contains(QStringLiteral("flagged")); } + bool isDeleted() const { return tags.contains(QStringLiteral("deleted")); } + bool isSpam() const { return tags.contains(QStringLiteral("spam")); } + + /// 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. + bool isDoomed() const { return isDeleted() || isSpam(); } }; struct MessageRef |
