Closed Bug 2047813 Opened 5 months ago Closed 5 months ago

Add preference to reverse sort order of messages within a thread

Categories

(Thunderbird :: Message Reader UI, enhancement)

Thunderbird 151
enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 479969

People

(Reporter: rnei, Unassigned)

Details

User Agent: Mozilla/5.0 (Android 16; Mobile; rv:151.0) Gecko/151.0 Firefox/151.0

Steps to reproduce:

Add a boolean preference such as mailnews.thread.reverse_order (default: false) and expose it in about:config or ideally in the UI under View → Sort By.
The relevant code is likely in mailnews/base/src/nsMsgDBView.cpp, in the method responsible for populating thread children (e.g. AddMsgsToThread or equivalent). A minimal change could iterate the child headers in reverse when the preference is enabled:

bool reverseThreadOrder = false;
prefs->GetBoolPref("mailnews.thread.reverse_order", &reverseThreadOrder);

int32_t start = reverseThreadOrder ? numChildren - 1 : 0;
int32_t end = reverseThreadOrder ? -1 : numChildren;
int32_t step = reverseThreadOrder ? -1 : 1;

for (int32_t i = start; i != end; i += step) {
nsCOMPtr<nsIMsgDBHdr> msgHdr;
thread->GetChildHdrAt(i, getter_AddRefs(msgHdr));
// append key...
}

Many users expect the most recent reply to be immediately visible at the top of a thread, especially those coming from email clients like Outlook or Apple Mail where this behavior is configurable. This is a frequently requested feature with no current workaround in modern Thunderbird versions (WebExtensions do not have access to thread pane internals).

Actual results:

Currently, when a thread is expanded in the message list, messages are always displayed in ascending chronological order (oldest message at the top, newest at the bottom). There is no way to reverse this order through preferences or UI settings, even when the global sort order is set to descending.

Expected results:

Users should be able to configure Thunderbird to display messages within a thread in descending order (newest message at the top), consistent with the global sort order setting.

Status: UNCONFIRMED → RESOLVED
Closed: 5 months ago
Duplicate of bug: 479969
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.