summaryrefslogtreecommitdiffstats
path: root/src/types.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-19 10:30:28 +0200
committerDanilo M. <danix@danix.xyz>2026-08-19 10:30:28 +0200
commit6f39b6350efc140a0b7f49701ffd52c54ec90bac (patch)
tree4d10cc671d1ed994b23263e80bdbc1c77c8df330 /src/types.h
parent69e2173b71e94e5a89c39b20d4a5962aadb715e9 (diff)
parent2e0db925d5ca7100d8405ffc352ae435cdbdb73d (diff)
downloadqtmaildir-6f39b6350efc140a0b7f49701ffd52c54ec90bac.tar.gz
qtmaildir-6f39b6350efc140a0b7f49701ffd52c54ec90bac.zip
Merge branch 'delete-to-trash'
Delete moves mail into the account's trash folder instead of only tagging it, with a Trash filter, Restore from trash, and a repeatable cleanup for the mail the old behaviour stranded. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/types.h')
-rw-r--r--src/types.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/types.h b/src/types.h
index 409ce79..f4d387a 100644
--- a/src/types.h
+++ b/src/types.h
@@ -62,6 +62,26 @@ struct ThreadSummary
/// file. Do not move it behind a flag by analogy with `recipients`.
QStringList firstMessageTags;
+ /// That message's file, RELATIVE to the database path, which is what says
+ /// which ACCOUNT it belongs to.
+ ///
+ /// Relative and not absolute, deliberately. The UI knows an account only
+ /// by its `maildir`, itself a database-relative prefix, so an absolute
+ /// path here matches no account and silently resolves every row to none.
+ ///
+ /// Needed because Delete moves the file (item 103) and the destination is
+ /// per account, so the action has to resolve an account before it can name
+ /// a trash folder. Resolving through the thread's account TAG instead is
+ /// not equivalent: that tag is optional config, so an account without one
+ /// would silently be undeletable, while a maildir prefix is what makes a
+ /// message belong to an account in the first place.
+ ///
+ /// Free for the same reason firstMessageId and firstMessageTags are: the
+ /// walk that finds that message is already happening, and this reads the
+ /// INDEX rather than the message file. Do not move it behind a flag by
+ /// analogy with `recipients`.
+ QString firstMessagePath;
+
/// Who the thread's messages were sent TO, summarised for one line.
///
/// Empty unless the query asked for it, and that is a performance