diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-26 16:22:49 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-26 16:22:49 +0200 |
| commit | 496e174e65c06563aff426bdbbeeba006102e89d (patch) | |
| tree | c43c434598fbfca36055a1cd7487fecb1dffce5f /src/notmuchworker.h | |
| parent | 409faeadf013952420963fa1b740d44526d8a95e (diff) | |
| download | qtmaildir-496e174e65c06563aff426bdbbeeba006102e89d.tar.gz qtmaildir-496e174e65c06563aff426bdbbeeba006102e89d.zip | |
feat: propose business senders from newly synced mail
Diffstat (limited to 'src/notmuchworker.h')
| -rw-r--r-- | src/notmuchworker.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/notmuchworker.h b/src/notmuchworker.h index 2efddaa..77b14ec 100644 --- a/src/notmuchworker.h +++ b/src/notmuchworker.h @@ -18,6 +18,7 @@ #pragma once +#include <QHash> #include <QMap> #include <QObject> #include <QStringList> @@ -281,6 +282,16 @@ public slots: /// root does not change while the application runs. void requestMailRoot(); + /// Counts messages per sender address over `query`. + /// + /// Index-served, so it is cheap: measured 2026-08-26 on the developer's + /// database, 1322 distinct senders in 12 ms over 5105 messages. It does + /// NOT touch m_generation, which is the QUERY generation: bumping it would + /// discard a thread load in flight and blank the message pane because the + /// user synced. Item 169, following the same rule requestMessageCounts + /// already follows. + void countSenders(const QString &query); + signals: void threadsReady(const QVector<ThreadSummary> &threads, quint64 generation); void queryFinished(int totalThreads, quint64 generation); @@ -356,6 +367,10 @@ signals: /// treat as "cannot compose a path yet" rather than as the root being "". void mailRootReady(const QString &mailRoot); + /// One sender per entry, lower-cased, with how many messages over `query` + /// came from it. The candidate list for the business-senders file. + void senderCountsReady(const QHash<QString, int> &counts); + void errorOccurred(const QString &message); private: |
