diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-01 10:31:52 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-01 10:31:52 +0200 |
| commit | 63c7a1fcaadb1e26c1597d5b86ce85066890ece3 (patch) | |
| tree | 80fd9e156af879818521015f0d9ad8384886c3da /src/mainwindow.cpp | |
| parent | b12aada52d682c45aa1e66e13dc448dc894aee79 (diff) | |
| download | qtmaildir-63c7a1fcaadb1e26c1597d5b86ce85066890ece3.tar.gz qtmaildir-63c7a1fcaadb1e26c1597d5b86ce85066890ece3.zip | |
fix: open a conversation's first message from the overview
Clicking the first message in a conversation overview's unread list did
nothing visible. applyPendingDashboardSelection() matched the
conversation row on the root's message id, so it reselected the row that
was already current and the overview stayed on screen. Since item 177
setThreadMessages keeps a conversation's first message as child 0, so
it has a row of its own. Only a thread of one now answers for its
message on its own row, the same guard 236ac86 added to the recovery.
AGENTS.md still said a thread's first message is never among its
children, which has been true only for a thread of one since item 177.
It is corrected to say so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 434f5d0..19373e3 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -5555,11 +5555,13 @@ void MainWindow::applyPendingDashboardSelection() if (m_model->threadAt(row).threadId != m_dashboardSelectThreadId) continue; - // The thread's first message is the ROOT row, not a child: - // setThreadMessages drops depth 0 because the root stands for it, so - // looking for it among the children finds nothing. - if (m_model->data(thread, ThreadListModel::MessageIdRole).toString() - == m_dashboardSelectMessageId) { + // Only a thread of one answers for its message on its own row. A + // CONVERSATION keeps its first message as child 0 since item 177, so + // matching the conversation row on the root's id reselected the row + // already showing the dashboard and the click did nothing visible. + if (!m_model->isConversationRow(thread) + && m_model->data(thread, ThreadListModel::MessageIdRole).toString() + == m_dashboardSelectMessageId) { selectRowAt(thread); m_dashboardSelectMessageId.clear(); m_dashboardSelectThreadId.clear(); |
