From 8018757b75262d009bc6611be76bf4696d549caa Mon Sep 17 00:00:00 2001 From: Nathan Kinkade Date: Sun, 15 Mar 2009 20:00:02 +0000 Subject: Change-set to let the IMAP server do the sensible sorting of threads i.e. sort threads by newest in-thread messages rather than simply by the root thread message. --- roundcubemail/program/steps/mail/func.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'roundcubemail/program/steps') diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index bac49463e..f9c1d951d 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -297,7 +297,7 @@ function rcmail_message_list($attrib) $header->deleted ? ' deleted' : '', $header->flagged ? ' flagged' : '', $zebra_class, - ($header->depth > 1) ? ' style="display: none"' : ''); + ($header->depth > 1 && $header->unread_children == 0 && $header->seen) ? 'style="display: none"' : ''); $tree = ''; $depth = $header->depth; @@ -305,7 +305,11 @@ function rcmail_message_list($attrib) { for ($i=1;$i<$depth;$i++) $tree .= '
 
'; - $tree .= $header->has_children?'':'
 
'; + $toggle_expanded = $header->unread_children ? 'expanded' : 'collapsed'; + // mark the row as expanded for the JS code + if ($toggle_expanded == 'expanded') + $js_row_arr['expanded'] = true; + $tree .= $header->has_children?'
 
':'
 
'; } $tree .= $message_icon ? sprintf($image_tag, $skin_path, $message_icon, '') : ''; -- cgit v1.2.3