summaryrefslogtreecommitdiffstats
path: root/src/threadlistmodel.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-28 11:26:41 +0200
committerDanilo M. <danix@danix.xyz>2026-08-28 11:26:41 +0200
commit9bec59c98a9f00e6e7f2c0181659a7639bc04e72 (patch)
treeb250c7e96c26626a554e3b26b020ce2ecb1fd921 /src/threadlistmodel.h
parent0133fb982da2dcbbfacb9e89b0de79dd483b39fb (diff)
downloadqtmaildir-9bec59c98a9f00e6e7f2c0181659a7639bc04e72.tar.gz
qtmaildir-9bec59c98a9f00e6e7f2c0181659a7639bc04e72.zip
feat: let a row say whether it is a conversation
One predicate for the question every scope, label and membership decision in item 177 keys on. It repeats hasChildren()'s rule deliberately: an expander and a conversation are the same fact, including that a loaded thread trusts its children over a count that included duplicates.
Diffstat (limited to 'src/threadlistmodel.h')
-rw-r--r--src/threadlistmodel.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/threadlistmodel.h b/src/threadlistmodel.h
index 4af09d8..d1baae1 100644
--- a/src/threadlistmodel.h
+++ b/src/threadlistmodel.h
@@ -324,6 +324,14 @@ public:
/// True when the index is a message row rather than a thread root.
bool isMessageRow(const QModelIndex &index) const;
+ /// Whether this row stands for a CONVERSATION rather than for one message.
+ ///
+ /// The single question every scope, label and membership decision keys on
+ /// (item 177). A row with replies is the conversation; a row without them
+ /// is its message and behaves as it always has. A message row is never
+ /// either, so the answer is false there rather than undefined.
+ bool isConversationRow(const QModelIndex &index) const;
+
/// The message row's node, or a default-constructed one for any index that
/// is not a message row.
MessageNode messageAt(const QModelIndex &index) const;