[Users] Sort threads and the emails inside the threads differently

Milan Obuch claws-mail-users at dino.sk
Tue Nov 22 14:16:44 CET 2022


On Tue, 22 Nov 2022 13:31:08 +0600
Enan Ajmain <3nan.ajmain at gmail.com> wrote:

> On Sun, 20 Nov 2022 21:16:24 +0100
> Ricardo Mones <ricardo at mones.org> wrote:
> > On Thu, 17 Nov 2022 17:38:28 +0600
> > Enan Ajmain <3nan.ajmain at gmail.com> wrote:
> > […]  
> > > So is there any way to sort the threads in descending order and
> > > the individual emails in a thread in ascending order?    
> > 
> > Not yet, patches welcome though.  
> 
> There is already a patch available:
>   o
> https://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=1491
> o
> https://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1710&action=diff
> 
> I can confirm this patch works as I expect.
> 
> This patch was left unreviewed, which makes me think this behavior
> will not be merged. But as an user I think this should be the default
> behavior.
> 
> If this patch is to be merged, what needs to be done? I'm guessing if
> a new option for sorting thread-specific scenario is added in the GUI
> menu, then the default behavior will remain unaltered, and users can
> choose to opt-in for this patch.
> 
> If adding an entry in the GUI menu increases the chance of this patch
> being merged, I will take the responsibility to implement that - but
> I'll need confirmation. After working with GUI, if it's not merged,
> then I'll have to keep rebasing/cherrypicking, rendering my work in
> GUI worthless.
> 

Hi,

I think this is the right approach - creating new sorting option. As an
exercise, I tried to do it. Patch attached. New option added to View ->
Sort submenu, labelled 'By thread date with subsort' (a bit awkward and
longy, easy to change for something better), and new sorting function
added as well, using the above mentioned patch.

Also, it can be set as default for summary view of folders in
configuration, there are some places, however, where something should
be done, additionally. Such places are denoted with // ?? comment in my
patch. I am not using threaded view myself, so I did not test it much,
but it compiles fine an druns when applied on top of recent master
repository (4.1.1-14-g741ecb).

Feel free to check it, comment here etc. Maybe there is a possibility
to merge it after some additional work and tests.

Regards,
Milan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: claws-mail-thread-sub.diff
Type: text/x-patch
Size: 6612 bytes
Desc: not available
URL: <http://lists.claws-mail.org/pipermail/users/attachments/20221122/51f3a2a4/attachment.bin>


More information about the Users mailing list