mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-25 17:21:05 -04:00
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:
parent
a5cc8d7ba2
commit
61e8d588a8
4 changed files with 42 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue