summaryrefslogtreecommitdiffstats
path: root/src/mainwindow.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-14 12:15:35 +0200
committerDanilo M. <danix@danix.xyz>2026-09-14 12:15:35 +0200
commit3d986788b9576451ef1215e0f423d587629b3f81 (patch)
tree6b414be3ededeb6e50d26c0175420ee5f6933e5d /src/mainwindow.h
parent91920f431cccbd425b28b9ee553fa425c005d7fe (diff)
downloadqtmaildir-3d986788b9576451ef1215e0f423d587629b3f81.tar.gz
qtmaildir-3d986788b9576451ef1215e0f423d587629b3f81.zip
feat: empty spam moves mail to the trash, per account
Diffstat (limited to 'src/mainwindow.h')
-rw-r--r--src/mainwindow.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 1fc8822..ab65f1d 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -1321,6 +1321,17 @@ private:
/// which holds whatever the current view happens to show.
void emptyTrash();
+ /// Moves every message in the spam folder to that account's trash. Unlike
+ /// emptyTrash() this is NOT a purge: it is a move, so it is undoable and
+ /// asks nothing. Scoped to the account selector like every other
+ /// account-aware surface, and grouped per account because the destination
+ /// differs: one account's spam moves to that account's own trash.
+ ///
+ /// Asynchronous for the same reason emptyTrash() is, but no confirm follows:
+ /// the answer arrives at onThreadMessagesResolved() tagged `empty_spam`,
+ /// which resolves the destinations from each message's own path.
+ void emptySpam();
+
/// Empty trash's sibling, scoped to the SELECTION rather than to the
/// account's whole trash. The act is identical, `purgeMessages()` in both
/// cases, and so are its safeguards: it confirms, and it carries no
@@ -1362,6 +1373,11 @@ private:
/// in it, and such a message carries no tag of ours.
bool isShowingTrash() const;
+ /// Whether the current query IS a spam view, for either scope. The exact
+ /// sibling of isShowingTrash(), for the same reason: Empty Spam drops rows
+ /// from a path-based view that no tag change can express.
+ bool isShowingSpam() const;
+
/// The `moved-from:` tag naming `dbRelativeFolder`, or empty when no
/// account owns it.
///