Bug 1233 - Capability to sort threads by most recent message
Summary: Capability to sort threads by most recent message
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: UI/Folder List (show other bugs)
Version: 2.9.2
Hardware: PC Linux
: P3 enhancement
Assignee: users
URL:
: 1245 1253 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-06 21:59 UTC by Steven Robertson
Modified: 2013-05-22 09:12 UTC (History)
3 users (show)

See Also:


Attachments

Description Steven Robertson 2007-06-06 21:59:27 UTC
I'm interested in a version of sort by date where the dates being compared are those of the most recent messages in a given thread.  This prevents the situation where a thread started some time ago but still active is sorted behind dozens of threads whose first message is newer but which are inactive.  I believe that this is typical behavior for most threaded conversations.  (Note that this is different from Bug 270; this deals only with threads as a whole, not with subthreads.)

IMHO, the simplest solution would be to add another column to the message list ("Last Thread Activity" or something) that would be set for (at least) the first message in the thread - the one which gets sorted - to the date of most recent activity in the thread.  From a quick glance at the source, it looks like this solution could be implemented without much effort.  It also seems to me as both pretty intuitive and easy to enable/disable, so it provides the feature without interfering with the behavior long-time Claws users may have come to expect.

Thanks for your consideration.
Comment 1 Colin Leroy 2007-06-11 19:12:33 UTC
It's not done because it'd be much slower to load folders with such a mode. 
Comment 2 Paul 2007-06-16 10:56:34 UTC
*** Bug 1245 has been marked as a duplicate of this bug. ***
Comment 3 Paul 2007-06-30 18:50:31 UTC
*** Bug 1253 has been marked as a duplicate of this bug. ***
Comment 4 Pierre Ossman 2007-06-30 19:14:24 UTC
If speed is an issue, can't we get it as a configurable addition?
Comment 5 users 2007-07-02 20:17:08 UTC
Changes related to this bug have been committed.
Please check latest CVS and update the bug accordingly.
You can also get the patch from:
http://www.colino.net/claws-mail/

2007-07-02 [colin]	2.10.0cvs2

	* src/folder.h
	* src/mainwindow.c
	* src/procmsg.h
	* src/summaryview.c
		Add View/Sort/by Thread date
		Fixes bug 1233, 'Capability to sort 
		threads by most recent message'
Comment 6 Colin Leroy 2007-07-02 23:25:35 UTC
Patch in CVS.
Comment 7 Pierre Ossman 2007-07-03 19:00:34 UTC
I could kiss you ;)

Now all that is missing is to save the sort mode to disk:

--- folder.c.orgi       2007-07-03 18:59:12.000000000 +0200
+++ folder.c    2007-07-03 19:00:13.000000000 +0200
@@ -573,6 +573,8 @@
                                item->sort_key = SORT_BY_TO;
                        else if (!strcmp(attr->value, "locked"))
                                item->sort_key = SORT_BY_LOCKED;
+                       else if (!strcmp(attr->value, "thread_date"))
+                               item->sort_key = SORT_BY_THREAD_DATE;
                } else if (!strcmp(attr->name, "sort_type")) {
                        if (!strcmp(attr->value, "ascending"))
                                item->sort_type = SORT_ASCENDING;
@@ -598,7 +600,7 @@
        static gchar *sort_key_str[] = {"none", "number", "size", "date",
                                        "from", "subject", "score", "label",
                                        "mark", "unread", "mime", "to", 
-                                       "locked"};
+                                       "locked", "thread_date"};
        XMLTag *tag;
        gchar *value;
 

Comment 8 Colin Leroy 2007-07-03 19:08:12 UTC
Oops!
Comment 9 users 2007-07-03 19:27:13 UTC
Changes related to this bug have been committed.
Please check latest CVS and update the bug accordingly.
You can also get the patch from:
http://www.colino.net/claws-mail/

2007-07-03 [colin]	2.10.0cvs4

	* src/folder.c
	* src/mainwindow.c
		Fix saving of sort mode for tags and
		thread date. Thanks to Pierre Ossman.
		Completes fix for bug 1233
Comment 10 Bogdan 2013-05-21 18:13:08 UTC
 I looked at bug 270 and now at this. The same WONTFIX statement. I understand you are concerned about the speed, but give the option to the user to choose between speed and convenience. 

I believe that sorting by tail instead by head will fix the problem and if you make this an option then people can choose what behaviour they want.

If this is already available in the configuration pages I apologise for the blurb.

Thanks.
Comment 11 Colin Leroy 2013-05-22 09:12:54 UTC
Hi Bogdan,

In fact the status was wrong, it's implemented now, it is available from View/Sort/by Thread Date.

HTH

Note You need to log in before you can comment on or make changes to this bug.