don't make a connection to the news server when updating unread counts
if there are no groups.  r/sr=bienvenu
This commit is contained in:
sspitzer%netscape.com 2001-08-21 04:17:27 +00:00
Родитель a990025b86
Коммит 1557fa3888
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -577,6 +577,15 @@ nsNntpIncomingServer::PerformExpand(nsIMsgWindow *aMsgWindow)
{ {
nsresult rv; nsresult rv;
// a user might have a new server without any groups.
// if so, bail out. no need to establish a connection to the server
PRInt32 numGroups = 0;
rv = GetNumGroupsNeedingCounts(&numGroups);
NS_ENSURE_SUCCESS(rv,rv);
if (!numGroups)
return NS_OK;
nsCOMPtr<nsINntpService> nntpService = do_GetService(NS_NNTPSERVICE_CONTRACTID, &rv); nsCOMPtr<nsINntpService> nntpService = do_GetService(NS_NNTPSERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv,rv); NS_ENSURE_SUCCESS(rv,rv);