diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-15 16:35:56 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-15 16:35:56 +0200 |
| commit | 6d35f7ec87590fd484ca7640d4d06c06a6d97970 (patch) | |
| tree | a465275f74b376209683cc63f9ec622f9dcc59aa /src/threadcidmap.cpp | |
| parent | ae0c0ec339dba2ce9f2b27a9ce289feb4719dcea (diff) | |
| download | qtmaildir-6d35f7ec87590fd484ca7640d4d06c06a6d97970.tar.gz qtmaildir-6d35f7ec87590fd484ca7640d4d06c06a6d97970.zip | |
feat(ui): open a thread on its own by double-clicking a row
Double-clicking any row drills into its thread: the list becomes that thread
alone, expanded, and the pane shows the double-clicked row's own message. A
reply therefore opens its WHOLE thread with itself selected, never itself alone,
which is what the user asked for and is not the obvious reading of "open it by
itself".
This is recoverStaleThread() triggered by a gesture. That function already ran
thread:<id>, expanded the thread when the row arrived, selected the target
message once the replies landed, and fell back to the root when the message had
gone; all three cases are existing paths through it, so the new code resolves a
row to a thread id and a message id and hands both over.
The row is reached through the INDEX and never through index.row(): a tree
numbers rows per parent, so threadAt(row) on a reply answers about an unrelated
thread. That is item 88's trap, avoided here by construction.
The first click of a double-click arms the mark-read timer, and the handler
cancels it, because a gesture that navigates must not mutate mail. The timer is
armed again for whichever row the recovery lands on, so only the arming for the
row being left is cancelled. Its test asserts the timer was active beforehand,
so it cannot pass by the timer never having been armed at all.
The expander keeps its own double-click: ThreadListView::mousePressEvent accepts
a press inside its rect and returns, so Qt never pairs one into a double-click
there.
Nothing is built for getting back. The filter buttons already are that, per the
user.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/threadcidmap.cpp')
0 files changed, 0 insertions, 0 deletions
