Mailnews New Management: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
 
Line 15: Line 15:


The folder attribute numNewMessages (which is the folder object mNumNewBiffMessages) could be replaced perhaps by a pending count of undownloaded messages plus the count of the database m_newList. As far as I can tell, this is mostly used in the folder tray icon. Most (all?) other uses of GetNumNewMessages are associated with maintaining that count, that is are followed by SetNumNewMessages with a delta value.
The folder attribute numNewMessages (which is the folder object mNumNewBiffMessages) could be replaced perhaps by a pending count of undownloaded messages plus the count of the database m_newList. As far as I can tell, this is mostly used in the folder tray icon. Most (all?) other uses of GetNumNewMessages are associated with maintaining that count, that is are followed by SetNumNewMessages with a delta value.
This code in nsImapMailFolder, called from protocol proxy based on folder information, looks dodgy:
  if (m_performingBiff && numNewUnread)
  {
    // We must ensure that the server knows that we are performing biff.
    // Otherwise the stand-alone biff won't fire.
    nsCOMPtr<nsIMsgIncomingServer> server;
    if (NS_SUCCEEDED(GetServer(getter_AddRefs(server))) && server)
      server->SetPerformingBiff(true);
    SetNumNewMessages(numNewUnread);
  }
That is, the numNewMessages is set to match an unread count from the folder.
Confirmed users
240

edits

Navigation menu