On Tuesday, 10 September 2013 10:20:24 CEST, Pali Rohár wrote:
Sorry, but I want to have always sorted messages by date (unless threading is enabled) and I really do not want to click "sort by date" every time I start Trojita.
I understand your preference, but the problem with this operation is that it can be extremely bandwidth hungry. I've just measured it on a sample mailbox with roughly 50k messages and whenever a new message arrives, roughly 340kB of data is transferred. That's unacceptable, in my opinion, and would put Trojita's self-presentation as a "lightweight IMAP client" in jeopardy.
You can "fix" this by lobbying for more servers to support CONTEXT=ESORT (good luck with that). Alternatively, you can propose changes to Trojita's sorting code (perhaps with a heuristic that would cache the sort result persistently, similar to how it's done with threading, and which would duplicate the algorithm on the client side in case enough data is already cached). That's what I would call a *proper* fix.
Please also keep in mind that the default sort order sorts according to when a message was delivered into the mailbox. In most situations, this is an accurate approximation of the "by date" sorting. Perhaps we should rename the GUI option from "no sorting" to "delivery date" (to distinguish it from "arrival", which is something different, see the INTERNALDATE semantics).
Yes, for this I prepared setting "gui/msgList.sortOrder". But IMAP function ThreadingMsgListModel::setUserWantsThreading(bool) is buggy when when is called, it change sorting to ascending. So now it is not easy to store/restore ascending/descending order when server supports threading.
Ah, you're right, it looks that this is actually not saved to disk. It could be that the sorting/threading backend has a bug -- patches welcome.
Cheers, Jan -- Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/