mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug #267672 --> Request: groups (when "group by sort") should have the number of read and unread emails
Patch originally by John slade <bugzilla@johnslade.co.uk> sr=bienvenu
This commit is contained in:
parent
ea0b137dab
commit
57429ba6cc
@ -625,6 +625,31 @@ NS_IMETHODIMP nsMsgGroupView::GetCellText(PRInt32 aRow, nsITreeColumn* aCol, nsA
|
||||
NS_ASSERTION(PR_FALSE, "we don't sort by group for this type");
|
||||
break;
|
||||
}
|
||||
|
||||
if (groupThread)
|
||||
{
|
||||
// Get number of messages in group
|
||||
nsAutoString formattedCountMsg;
|
||||
PRUint32 numMsg = groupThread->NumRealChildren();
|
||||
formattedCountMsg.AppendInt(numMsg);
|
||||
|
||||
// Get number of unread messages
|
||||
nsAutoString formattedCountUnrMsg;
|
||||
PRUint32 numUnrMsg = 0;
|
||||
groupThread->GetNumUnreadChildren(&numUnrMsg);
|
||||
formattedCountUnrMsg.AppendInt(numUnrMsg);
|
||||
|
||||
// Add text to header
|
||||
aValue.Append(NS_LITERAL_STRING(" ("));
|
||||
if (numUnrMsg)
|
||||
{
|
||||
aValue.Append(formattedCountUnrMsg);
|
||||
aValue.Append(NS_LITERAL_STRING("/"));
|
||||
}
|
||||
|
||||
aValue.Append(formattedCountMsg);
|
||||
aValue.Append(NS_LITERAL_STRING(")"));
|
||||
}
|
||||
}
|
||||
else if (colID[0] == 't')
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user