mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04: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
@ -219,8 +219,14 @@ void p3GxsChannels::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
std::list<RsGxsGroupId> &grpList = grpChange->mGrpIdList;
|
std::list<RsGxsGroupId> &grpList = grpChange->mGrpIdList;
|
||||||
std::list<RsGxsGroupId>::iterator git;
|
std::list<RsGxsGroupId>::iterator git;
|
||||||
for (git = grpList.begin(); git != grpList.end(); ++git)
|
for (git = grpList.begin(); git != grpList.end(); ++git)
|
||||||
|
{
|
||||||
|
if(mKnownChannels.find(*git) == mKnownChannels.end())
|
||||||
{
|
{
|
||||||
notify->AddFeedItem(RS_FEED_ITEM_CHANNEL_NEW, git->toStdString());
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -218,6 +218,7 @@ bool generateGroup(uint32_t &token, std::string groupName);
|
|||||||
RsGxsMessageId mGenThreadId;
|
RsGxsMessageId mGenThreadId;
|
||||||
|
|
||||||
p3GxsCommentService *mCommentService;
|
p3GxsCommentService *mCommentService;
|
||||||
|
std::set<RsGxsGroupId> mKnownChannels;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -142,9 +142,16 @@ void p3GxsForums::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
/* group received */
|
/* group received */
|
||||||
std::list<RsGxsGroupId> &grpList = grpChange->mGrpIdList;
|
std::list<RsGxsGroupId> &grpList = grpChange->mGrpIdList;
|
||||||
std::list<RsGxsGroupId>::iterator git;
|
std::list<RsGxsGroupId>::iterator git;
|
||||||
|
|
||||||
for (git = grpList.begin(); git != grpList.end(); ++git)
|
for (git = grpList.begin(); git != grpList.end(); ++git)
|
||||||
|
{
|
||||||
|
if(mKnownForums.find(*git) == mKnownForums.end())
|
||||||
{
|
{
|
||||||
notify->AddFeedItem(RS_FEED_ITEM_FORUM_NEW, git->toStdString());
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -117,6 +117,7 @@ bool generateGroup(uint32_t &token, std::string groupName);
|
|||||||
int mGenCount;
|
int mGenCount;
|
||||||
std::vector<ForumDummyRef> mGenRefs;
|
std::vector<ForumDummyRef> mGenRefs;
|
||||||
RsGxsMessageId mGenThreadId;
|
RsGxsMessageId mGenThreadId;
|
||||||
|
std::set<RsGxsGroupId> mKnownForums ;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user