aboutsummaryrefslogtreecommitdiffstats
path: root/src/threadlistmodel.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-28 20:46:44 +0200
committerDanilo M. <danix@danix.xyz>2026-08-28 20:46:44 +0200
commitd7c4d03f7d583767bc23406579e11bcc884dec18 (patch)
treeabe49fa75cb88d768a892cc11a8c2258869ead85 /src/threadlistmodel.h
parentae2ae2df75ed780a88423b77af3b31fbe2b26389 (diff)
downloadqtmaildir-thread-row-identity.tar.gz
qtmaildir-thread-row-identity.zip
feat: count a card's messages, not its repliesthread-row-identity
The expander pill read "N replies" while the row stood for the conversation: a thread of one message and four replies said "4 replies" over rows that listed all five messages. The user's model is messages, so it now reads "5 messages". A thread of one still shows nothing: its row is the message, the pill is the expander, and there is nothing to open. ReplyCountRole becomes MessageCountRole and CardLayout::Input::replyCount becomes messageCount, so the names stop lying about what they carry. The label is now translated under a CardLayout context, with Italian "messaggio"/"messaggi" shipped; %n's untranslated fallback on this Qt does not pluralise, so the two forms are separate entries. The card's densest geometry test needs 460px rather than 400 now that the pill is one character wider.
Diffstat (limited to 'src/threadlistmodel.h')
-rw-r--r--src/threadlistmodel.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/threadlistmodel.h b/src/threadlistmodel.h
index 93474ac..fee4a1f 100644
--- a/src/threadlistmodel.h
+++ b/src/threadlistmodel.h
@@ -83,7 +83,8 @@ public:
MessageIdRole,
/// The message's reply depth, for the view's indentation. 1 for a
- /// direct reply, since depth 0 is the root row itself.
+ /// direct reply; 0 is the thread's first message, which sits under the
+ /// conversation row unindented.
MessageDepthRole,
/// True when the row is a thread that has replies to show.
@@ -138,7 +139,8 @@ public:
/// bool; the message was replied to, from the Maildir "R" flag.
IsRepliedRole,
- ReplyCountRole, ///< int; 0 when a thread has no replies.
+ MessageCountRole, ///< int; messages in the conversation, 0 when the
+ ///< thread has one message and nothing to expand.
/// The [general] date_format pattern, or empty for the system's short
/// format. Same row value for every row.
@@ -207,7 +209,7 @@ public:
/// that is what keeps it from leaking: it is off by default, only the Sent
/// button turns it on, and every other query turns it off again. The
/// expander already comes from hasChildren() and the card's count from
- /// ReplyCountRole, so flat mode is those two answering differently and
+ /// MessageCountRole, so flat mode is those two answering differently and
/// nothing else changes.
///
/// The children are not discarded, only hidden. Leaving flat mode restores