aboutsummaryrefslogtreecommitdiffstats
path: root/assets/mailsync.sh
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-15 10:50:59 +0200
committerDanilo M. <danix@danix.xyz>2026-08-15 10:50:59 +0200
commitde0d3aaa63be2867d127304d55d34259eb6e30d6 (patch)
tree3911cb7563d36aad65de8e6afb6c845555c023c9 /assets/mailsync.sh
parente6e18849bd5aa49dbdd299982d39a92e7360d0aa (diff)
downloadqtmaildir-de0d3aaa63be2867d127304d55d34259eb6e30d6.tar.gz
qtmaildir-de0d3aaa63be2867d127304d55d34259eb6e30d6.zip
feat(filters): resolve built-in filters per account
Item 93, the Config half. Four built-in filters, Unread, Inbox, Flagged and Sent, as generated entries in kQueryGenerators, which was already a closed set validated on load for Sent alone. resolvedQuery() gains an overload taking an account key, and that is what makes a filter compose with the account dropdown instead of fighting it. A generator is asked for the account's OWN query rather than having its all-accounts query wrapped in a scope: wrapping gives path:"a/**" and (path:"a/Sent/**" or path:"b/Sent/**") which returns the right rows only because path: is hierarchical, so a row-count test passes against it. The tests assert on the query string for that reason, and the mutation putting the wrap back fails two of them. An ordinary saved query ignores the account key and keeps resolving through its own stored account, which is the behaviour item 90 leaves alone. matchNothingQuery() exists because an empty query means "match everything" to notmuch: an account configuring no sent folder would otherwise give a button labelled Sent that shows the entire Maildir. Config gains Q_DECLARE_TR_FUNCTIONS for the filter names, which are button labels. The generator names are not translated: they are matched against the closed set and stored in queries.json, so translating them would make a file written in one locale unreadable in another. No UI yet, and no migration: the query row still builds from pinned saved queries.
Diffstat (limited to 'assets/mailsync.sh')
0 files changed, 0 insertions, 0 deletions