diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-31 12:24:32 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-31 12:24:32 +0100 |
| commit | ef42103bb1639006c5558eae5f857cd8f9ad2418 (patch) | |
| tree | 33aada792086d58d6a97690f52fdfd4e84f6f33e /tests/test_mainwindow.cpp | |
| parent | aa5fc733c768f8779af897c0cdcaf836b2afcefb (diff) | |
| download | qtmaildir-ef42103bb1639006c5558eae5f857cd8f9ad2418.tar.gz qtmaildir-ef42103bb1639006c5558eae5f857cd8f9ad2418.zip | |
feat: a worker entry point that applies a rule to existing mail
applyRule() replaces applyTagsToQuery(). It resolves the messages the
whole rule would move once, then writes one tag at a time over that
fixed list, and answers with ruleApplied(token, changes): one TagChange
per operation carrying the ids it actually moved. Always answered, even
when nothing moved, and never through tagsApplied(), so the window can
build the undo entry from the answer instead of the shared confirmation
queue that user gestures also use.
Resolving once matters when the query names a tag the rule removes:
re-resolving after the first write matched nothing and wrote half the
rule. Writing per tag keeps each effective set exact, so the undo never
strips a tag a message had before.
applyTags() keeps its behaviour; its body is now writeTags(), which
returns the changed ids without emitting.
Item 212.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_mainwindow.cpp')
0 files changed, 0 insertions, 0 deletions
