Bug 358680

Summary: sort order not saved when not threaded
Product: [Applications] trojita Reporter: onli
Component: Desktop GUIAssignee: Trojita default assignee <trojita-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: aegoreev, bwat47, entisten, marek, szg0000
Priority: NOR    
Version First Reported In: 0.6   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Patch for fixing bug 358680

Description onli 2016-01-28 12:48:44 UTC
When being in the message list for the first time, the user has the option to sort by date, name,… by clicking on the labels at the top. That works, but that selection is not saved when ending the program. It is also not saved when setting the sort order via "view -> sort order" (translating from german here). 

It seems to only be saved when selecting the option below, "show messages in discussions", and then in the sort order menu leaving it in the threaded mode. Then it is possible to select ascending or descending and this persists after a program restart, which seems to sort by date.

Trojita should always remember the selected sort order.

Reproducible: Always

Steps to Reproduce:
1. Have threading mode deactivated
2. Select a sort order
3. restart trojita


Actual Results:  
Sort order is back to default, sort by date ascending

Expected Results:  
Sort order should remain at what user selected

Related code seems quite complicated
Comment 1 Jan Kundrát 2017-03-27 10:09:41 UTC
*** Bug 378149 has been marked as a duplicate of this bug. ***
Comment 2 Christoph Feck 2017-10-25 13:54:04 UTC
*** Bug 385935 has been marked as a duplicate of this bug. ***
Comment 3 sebB 2017-11-23 21:07:15 UTC
I confirm this bug too.

For exemple:
- Open trojita
- Sort by date
- Open imap settings
- Save without any change

Sort is reset to none
Comment 4 Brandon Watkins 2018-02-27 00:08:30 UTC
This is a pretty huge usability issue (seriously, no one wants to sort new mails to the bottom) if your mail server does not support threading (in which case there's no workaround by enabling threading, your sorting settings are always reset no matter what).
Comment 5 Jan Kundrát 2018-03-01 09:35:14 UTC
> (seriously, no one wants to sort new mails to the bottom)

That's incorrect, "people have always wanted that" :).

Anyway, patches which make Trojita remember the search order are welcome.
Comment 6 Marek Malevič 2019-05-02 22:39:55 UTC
Created attachment 119802 [details]
Patch for fixing bug 358680

I have created a patch that stores selected sorting order in profile config and uses it when messages are updated.

This solves sorting issues (at least in my case).

The patch may not be perfect, I am not a C++ guy.
Comment 7 Jan Kundrát 2019-05-03 14:43:58 UTC
Hi Marek,
we're using Gerrit for patch review in Trojita. Can you please proceed as per https://techbase.kde.org/Development/Gerrit ?
Comment 8 Marek Malevič 2019-05-03 17:25:08 UTC
Hi Jan, learning Gerrit I created https://gerrit.vesnicky.cesnet.cz/r/#/c/1024/ . Hopefully it is as it should...
Comment 9 Christoph Cullmann 2024-09-23 18:50:45 UTC
Trojitá is no longer maintained, please switch to a maintained alternative like https://apps.kde.org/kmail2/

Sorry for the inconveniences.