aboutsummaryrefslogtreecommitdiffstats
path: root/mail-overview/MailPanel.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-12 10:12:45 +0200
committerDanilo M. <danix@danix.xyz>2026-09-12 10:12:45 +0200
commit92cf294993c49fa95547ad14ac7d21c7c7a2b837 (patch)
treebd6465e9df4db75306cd87a0db4ecd3af78e4c02 /mail-overview/MailPanel.qml
parentcaca07a9daa948f1bc62b807360c364d77c3a322 (diff)
downloadquickshell-92cf294993c49fa95547ad14ac7d21c7c7a2b837.tar.gz
quickshell-92cf294993c49fa95547ad14ac7d21c7c7a2b837.zip
feat(mail-overview): account model singleton
Accounts.qml is the data layer for the mail drawer: it parses accounts from qtmaildir.conf rather than hardcoding them, so adding an account there needs no edit here. The key runs to the closing bracket, not the first dot, because at least one configured key contains a dot of its own; matching only up to the first dot would silently truncate it and drop that account's mail from every count. Counting uses the account-<key> notmuch tag, not a path glob. notmuch deduplicates by message id, so a message delivered to two of the configured addresses is one message with two file paths: a path glob would count it under both accounts and the per-account rows would sum higher than the global total the waybar icon already shows (measured elsewhere as 102 vs 101). The tag is a property of the message, so it is singular and the rows always sum to the header exactly. An unknown count is -1, never 0. notmuch has one failure mode with no distinct exit status: a rejected query fragment can still return 0 exit and empty output, and an empty string must not become a zero, which would render as "no unread mail" instead of "count unavailable". Output is validated as a non-negative integer before being trusted. Includes a temporary console-log probe in shell.qml, added deliberately for runtime verification of this model outside the drawer UI (Task 4). It stays until the user has run and confirmed it against real notmuch output, then gets removed in a follow-up commit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WWL8JYHu7yhAdtx5pU9PMU
Diffstat (limited to 'mail-overview/MailPanel.qml')
0 files changed, 0 insertions, 0 deletions