diff options
Diffstat (limited to 'src/tagrules.h')
| -rw-r--r-- | src/tagrules.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tagrules.h b/src/tagrules.h index 946329a..2ceafef 100644 --- a/src/tagrules.h +++ b/src/tagrules.h @@ -43,6 +43,10 @@ struct TagRule QString move; int stage = 50; ///< Ascending. Account tags 10, topic rules 50. bool enabled = true; + /// Lets the post-new hook remove `inbox` from arriving mail for this rule + /// (item 213). Meaningless, and cleared on save, unless `remove` holds + /// `inbox`. `unread` stays refused regardless. + bool allowArchive = false; /// Fields this version of qtmaildir does not understand, kept verbatim and /// written back on save. Without this, one save from here silently strips @@ -104,6 +108,11 @@ public: /// could reach the file and never come back. static QStringList validate(const QList<TagRule> &rules); + /// Whether the post-new hook will skip this rule whole. Mirrors + /// PROTECTED_REMOVALS in assets/hooks/post-new: `unread` always, `inbox` + /// unless the rule opts in with allowArchive. + static bool hookWouldSkip(const TagRule &rule); + /// No file yet, as distinct from a file that would not load. A fresh /// install is not an error and must not be reported as one. bool missing() const { return m_missing; } |
