aboutsummaryrefslogtreecommitdiffstats
path: root/src/types.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-03 14:57:11 +0200
committerDanilo M. <danix@danix.xyz>2026-08-04 12:53:23 +0200
commit85bb759c46aef929beb66613159e4b23fcaf75fb (patch)
treeef8c08db29a7ce6b4052e6533c4f66b8f5a258bf /src/types.h
parentc40cedf5250514cdf0d4a82aac71158df2750c12 (diff)
downloadqtmaildir-85bb759c46aef929beb66613159e4b23fcaf75fb.tar.gz
qtmaildir-85bb759c46aef929beb66613159e4b23fcaf75fb.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.h7
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