"when i check mail, the app just sort of freezes up for a few seconds"

bail out early if we are setting the string property to the current value.
this bug was exposed by my junk mail envelope checkin (bug #190825).

thanks to bryner for noticing the regression.

r/sr=bienvenu
This commit is contained in:
sspitzer%netscape.com 2003-02-28 03:19:38 +00:00
Родитель c31255d3cd
Коммит 0c06599830
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -1900,10 +1900,19 @@ NS_IMETHODIMP nsMsgDatabase::SetStringProperty(nsMsgKey aKey, const char *aPrope
if (NS_FAILED(rv) || !msgHdr)
return NS_MSG_MESSAGE_NOT_FOUND; // XXX return rv?
nsXPIDLCString oldValue;
rv = msgHdr->GetStringProperty(aProperty, getter_Copies(oldValue));
NS_ENSURE_SUCCESS(rv,rv);
// if no change to this string property, bail out
if (!strcmp(aValue, oldValue.get()))
return NS_OK;
rv = msgHdr->SetStringProperty(aProperty, aValue);
NS_ENSURE_SUCCESS(rv,rv);
if (strcmp(aProperty, "junkscore") == 0)
// if this is the junk score property notify
if (!strcmp(aProperty, "junkscore"))
NotifyJunkScoreChanged(nsnull);
PRUint32 flags;