mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 07:59:35 -05:00
Merge pull request #911 from csoler/v0.6-GxsTransport
changed sorting of popular forums w.r.t. time of last post rather tha…
This commit is contained in:
commit
27774baf5d
@ -815,8 +815,8 @@ void GxsGroupFrameDialog::insertGroupsData(const std::list<RsGroupMetaData> &gro
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* rate the others by popularity */
|
//popMap.insert(std::make_pair(it->mPop, groupItemInfo)); /* rate the others by popularity */
|
||||||
popMap.insert(std::make_pair(it->mPop, groupItemInfo));
|
popMap.insert(std::make_pair(it->mLastPost, groupItemInfo)); /* rate the others by time of last post */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -830,17 +830,17 @@ void GxsGroupFrameDialog::insertGroupsData(const std::list<RsGroupMetaData> &gro
|
|||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
uint32_t popLimit = 0;
|
uint32_t popLimit = 0;
|
||||||
std::multimap<uint32_t, GroupItemInfo>::reverse_iterator rit;
|
std::multimap<uint32_t, GroupItemInfo>::reverse_iterator rit;
|
||||||
for(rit = popMap.rbegin(); ((rit != popMap.rend()) && (i < popCount)); ++rit, ++i) ;
|
//for(rit = popMap.rbegin(); ((rit != popMap.rend()) && (i < popCount)); ++rit, ++i) ;
|
||||||
if (rit != popMap.rend()) {
|
//if (rit != popMap.rend()) {
|
||||||
popLimit = rit->first;
|
// popLimit = rit->first;
|
||||||
}
|
//}
|
||||||
|
|
||||||
for (rit = popMap.rbegin(); rit != popMap.rend(); ++rit) {
|
for (rit = popMap.rbegin(); rit != popMap.rend(); ++rit,++i) {
|
||||||
if (rit->second.popularity < (int) popLimit) {
|
//if (rit->second.popularity > (int) popLimit) {
|
||||||
otherList.append(rit->second);
|
if(i < popCount)
|
||||||
} else {
|
|
||||||
popList.append(rit->second);
|
popList.append(rit->second);
|
||||||
}
|
else
|
||||||
|
otherList.append(rit->second);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* now we can add them in as a tree! */
|
/* now we can add them in as a tree! */
|
||||||
|
Loading…
Reference in New Issue
Block a user