mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 17:09:34 -05:00
qick fix to allow re-advertising for known forums/channels during the same session. Will be reset at restart (probably best)
This commit is contained in:
parent
fbd72ddf73
commit
b71f4757fe
@ -220,7 +220,13 @@ void p3GxsChannels::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
||||
std::list<RsGxsGroupId>::iterator git;
|
||||
for (git = grpList.begin(); git != grpList.end(); ++git)
|
||||
{
|
||||
notify->AddFeedItem(RS_FEED_ITEM_CHANNEL_NEW, git->toStdString());
|
||||
if(mKnownChannels.find(*git) == mKnownChannels.end())
|
||||
{
|
||||
notify->AddFeedItem(RS_FEED_ITEM_CHANNEL_NEW, git->toStdString());
|
||||
mKnownChannels.insert(*git) ;
|
||||
}
|
||||
else
|
||||
std::cerr << "(II) Not notifying already known channel " << *git << std::endl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -218,6 +218,7 @@ bool generateGroup(uint32_t &token, std::string groupName);
|
||||
RsGxsMessageId mGenThreadId;
|
||||
|
||||
p3GxsCommentService *mCommentService;
|
||||
std::set<RsGxsGroupId> mKnownChannels;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -142,9 +142,16 @@ void p3GxsForums::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
||||
/* group received */
|
||||
std::list<RsGxsGroupId> &grpList = grpChange->mGrpIdList;
|
||||
std::list<RsGxsGroupId>::iterator git;
|
||||
|
||||
for (git = grpList.begin(); git != grpList.end(); ++git)
|
||||
{
|
||||
notify->AddFeedItem(RS_FEED_ITEM_FORUM_NEW, git->toStdString());
|
||||
if(mKnownForums.find(*git) == mKnownForums.end())
|
||||
{
|
||||
notify->AddFeedItem(RS_FEED_ITEM_FORUM_NEW, git->toStdString());
|
||||
mKnownForums.insert(*git) ;
|
||||
}
|
||||
else
|
||||
std::cerr << "(II) Not notifying already known forum " << *git << std::endl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -117,6 +117,7 @@ bool generateGroup(uint32_t &token, std::string groupName);
|
||||
int mGenCount;
|
||||
std::vector<ForumDummyRef> mGenRefs;
|
||||
RsGxsMessageId mGenThreadId;
|
||||
std::set<RsGxsGroupId> mKnownForums ;
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user