Added ClearFeedItems() function to pqinotify interface.

Clear NewsFeeds after Cache loading so we only see new stuff.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2974 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2010-05-23 16:35:42 +00:00
parent a5cc8d7ba2
commit 61e8d588a8
4 changed files with 42 additions and 1 deletions

View file

@ -195,3 +195,22 @@ bool p3Notify::AddFeedItem(uint32_t type, std::string id1, std::string id2, std:
return true;
}
bool p3Notify::ClearFeedItems(uint32_t type)
{
RsStackMutex stack(noteMtx); /************* LOCK MUTEX ************/
std::list<RsFeedItem>::iterator it;
for(it = pendingNewsFeed.begin(); it != pendingNewsFeed.end(); )
{
if (it->mType == type)
{
it = pendingNewsFeed.erase(it);
}
else
{
it++;
}
}
return true;
}