Bug 1563 - Folder view: show complete threads if they contain unread messages
Summary: Folder view: show complete threads if they contain unread messages
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: UI/Folder List (show other bugs)
Version: 3.3.1
Hardware: PC Linux
: P3 enhancement
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2008-04-02 19:27 UTC by Malte J. Wetz
Modified: 2011-12-29 22:17 UTC (History)
2 users (show)

See Also:


Attachments
Patch implementing this feature. (12.10 KB, patch)
2010-04-08 19:55 UTC, Paul Ollis
no flags Details | Diff

Description Malte J. Wetz 2008-04-02 19:27:46 UTC
I would love to have the possibility to show all threads that contain at least one unread message (specifically in newsgroups).

claws-mail can either display all thread or hide all read messages, breaking the threads apart.

So if there is one unread message within a thread the entire thread should be displayed. Otherwise it should be hidden.
Comment 1 Bodo Thiesen 2008-06-13 05:36:27 UTC
Yea, just wanted to post the same Feature Request. Additionally, it would be nice to have the ability to sort the threads according to it's NEWEST message - regardless where exactly in the thread it is. So even a very old thread would be shown on top (bottom) together with the new threads if someone answers to that.
Comment 2 Colin Leroy 2008-06-13 05:46:08 UTC
(In reply to comment #1)
> Yea, just wanted to post the same Feature Request. Additionally, it would be
> nice to have the ability to sort the threads according to it's NEWEST message -
> regardless where exactly in the thread it is. So even a very old thread would
> be shown on top (bottom) together with the new threads if someone answers to
> that.

This is possible, using View/Sort/by thread date.
Comment 3 Paul Ollis 2010-04-08 19:55:23 UTC
Created attachment 829 [details]
Patch implementing this feature.

This patch implements this feature.

It only based on about 3-4 hours work, starting with no familiarity with the code. So this may be a dumb implementation and almost certainly needs tidying up. I am happily using the modified code, for the last 3 days.

I do not consider it finished, just proof of concept. However, if people think this is worth pursuing then I am happy to put it the additional effort to clean this up.
Comment 4 Colin Leroy 2010-04-09 08:09:09 UTC
This seems to be a nice patch. You can take a shortcut and stop traversing nodes as soon as you get an unread mail by returning TRUE from summary_update_is_read().
Comment 5 Graham P Davis 2011-11-15 19:27:41 UTC
I started using Claws a few days ago and was surprised that this option is not available. TB has "view ==> threads ==> threads with unread," Pan has a filter button "match only unread articles" but this keeps the whole thread visible. Knode has "filter ==> threads with unread." 

Could Claws have "view ==> hide read threads" in addition to "view ==> hide read messages?" I've now looked at Paul's patch and I see we're of the same mind. 

Any chance of Paul's patch getting implemented?
Comment 6 users 2011-11-19 15:15:36 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/

2011-11-19 [pawel]	3.7.10cvs90

	* src/folder.c
	* src/folder.h
	* src/folder_item_prefs.c
	* src/folderview.c
	* src/mainwindow.c
	* src/mainwindow.h
	* src/summaryview.c
	* src/summaryview.h
	* src/gtk/authors.h
		Fix bug #1563 'Folder view: show complete threads if they
		contain unread messages'
		Add option to show only threads with unread messages
		initial patch by Paul Ollis, my small additions:
		- when checking thread for unread finish on first unread
		- make thread options unavailable when threading is off
		- hide_unread_msgs and hide_unread_threads are mutually
		  exclusive options, set menus sensitivity accordingly
		- set folder item icon type similiar to hide_unread_msgs

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