From d7c4d03f7d583767bc23406579e11bcc884dec18 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 28 Aug 2026 20:46:44 +0200 Subject: feat: count a card's messages, not its replies 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. --- src/threadlistview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/threadlistview.cpp') diff --git a/src/threadlistview.cpp b/src/threadlistview.cpp index 5a3ce77..019d7c9 100644 --- a/src/threadlistview.cpp +++ b/src/threadlistview.cpp @@ -27,10 +27,10 @@ void ThreadListView::mousePressEvent(QMouseEvent *event) { const QModelIndex index = indexAt(event->pos()); - // The reply count IS the expander. Anything outside its rect selects the + // The message count IS the expander. Anything outside its rect selects the // card and opens it, which is what the rest of the card is for. if (event->button() == Qt::LeftButton && index.isValid() - && index.data(ThreadListModel::ReplyCountRole).toInt() > 0) { + && index.data(ThreadListModel::MessageCountRole).toInt() > 0) { QStyleOptionViewItem option; initViewItemOption(&option); -- cgit v1.2.3