mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 09:26:18 -05:00
simple hack to have non active groups gradually loose popularity and number of posts.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8225 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
21d62edca2
commit
4624d53dd7
@ -857,8 +857,16 @@ bool RsGxsNetService::loadList(std::list<RsItem *> &load)
|
|||||||
{
|
{
|
||||||
RsGroupNetworkStatsRecord& gnsr = mGroupNetworkStats[it2->first] ;
|
RsGroupNetworkStatsRecord& gnsr = mGroupNetworkStats[it2->first] ;
|
||||||
|
|
||||||
|
// At each reload, divide the last count by 2. This gradually flushes old information away.
|
||||||
|
|
||||||
|
gnsr.max_visible_count = std::max(it2->second.message_count,gnsr.max_visible_count/2) ;
|
||||||
|
|
||||||
|
// Similarly, we remove some of the suppliers randomly. If they are
|
||||||
|
// actual suppliers, they will come back automatically. If they are
|
||||||
|
// not, they will be forgotten.
|
||||||
|
|
||||||
|
if(RSRandom::random_f32() > 0.2)
|
||||||
gnsr.suppliers.insert(it->first) ;
|
gnsr.suppliers.insert(it->first) ;
|
||||||
gnsr.max_visible_count = std::max(it2->second.message_count,gnsr.max_visible_count) ;
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user