Sorting after the only child message has been deleted removes the parent message from the view
Categories
(Thunderbird :: Folder and Message Lists, defect)
Tracking
(Not tracked)
People
(Reporter: welpy-cw, Assigned: welpy-cw)
References
Details
Attachments
(1 file)
Steps to reproduce:
- In a real folder, delete the child message of a thread consisting of only two messages, either directly, or remotely from another view of that folder.
- Sort the view by any other type or order.
After step 1, the expansion twisty is correctly removed from the parent message. After step 2, the parent message disappears completely from the view. The message reappears after leaving and re-entering the folder.
This is reproducible with Thunderbird 102 and probably never worked correctly before. It could have been fixed with bug 1893180 or bug 1913385, but was not.
| Assignee | ||
Comment 1•1 month ago
•
|
||
When deleting a message left a thread with only its root, the view
stripped MSG_VIEW_FLAG_ISTHREAD from the root row along with Elided and
MSG_VIEW_FLAG_HASCHILDREN. The twisty correctly disappeared, but
ISTHREAD is not just a UI hint: ReverseThreads() uses it to find thread
boundaries when reversing the sort order. With the flag gone, a later
sort-order toggle dropped the root row from m_keys/m_flags/m_levels,
making the message vanish from the list until the folder was re-entered
or compacted.
Keep ISTHREAD and clear only Elided | HASCHILDREN - that is sufficient
to flatten the row in the UI (expand/collapse already requires both
HASCHILDREN and ISTHREAD). Fixed in two places:
nsMsgDBView::OnHdrDeleted() (message deleted while hidden in a collapsed thread)
nsMsgThreadedDBView::RemoveByIndex() (visible message deleted)
The same pattern exists in nsMsgSearchDBView::RemoveByIndex() but was
left alone: cross-folder threads couldn't be made to exhibit the bug.
Based on research by alta88.
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
Pushed by brendan@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/9c1603ae8321
Keep MSG_VIEW_FLAG_ISTHREAD on single-message thread roots. r=mkmelin
Description
•