From 32fa34c338f4a97c803250ac72df656149b19b87 Mon Sep 17 00:00:00 2001 From: "bienvenu%netscape.com" Date: Fri, 4 May 2001 02:44:50 +0000 Subject: [PATCH] fix getting expired article message only once per message in a session, and selecting expired articles not marking them read r=mscott, sr=sspitzer 76517 and 76515 --- mailnews/news/src/nsNNTPProtocol.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/mailnews/news/src/nsNNTPProtocol.cpp b/mailnews/news/src/nsNNTPProtocol.cpp index 121074cb7320..23ce9c6228a1 100644 --- a/mailnews/news/src/nsNNTPProtocol.cpp +++ b/mailnews/news/src/nsNNTPProtocol.cpp @@ -2162,12 +2162,23 @@ PRInt32 nsNNTPProtocol::SendFirstNNTPCommandResponse() m_nextState = NEWS_ERROR; else m_nextState = NNTP_ERROR; + // if we have no channel listener, then we're likely downloading + // the message for offline use (or at least not displaying it) + PRBool savingArticleOffline = (m_channelListener == nsnull); - PRBool savingArticleOffline = PR_FALSE; - if (m_newsFolder) - m_newsFolder->GetSaveArticleOffline(&savingArticleOffline); + nsCOMPtr memCacheEntry; + if (m_runningURL) + { + nsCOMPtr mailnewsurl = do_QueryInterface(m_runningURL); + if (mailnewsurl) + mailnewsurl->GetMemCacheEntry(getter_AddRefs(memCacheEntry)); + // invalidate mem cache entry. + if (memCacheEntry) + memCacheEntry->Doom(); + } if (NS_SUCCEEDED(rv) && group_name && !savingArticleOffline) { + MarkCurrentMsgRead(); nsXPIDLString titleStr; rv = GetNewsStringByName("htmlNewsErrorTitle", getter_Copies(titleStr)); NS_ENSURE_SUCCESS(rv,rv);