mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-21 15:30:31 -04:00
fixed a few UI bugs in channel posts
This commit is contained in:
parent
67e8b87750
commit
f40d7a75b3
4 changed files with 35 additions and 12 deletions
|
@ -401,6 +401,11 @@ void RsGxsChannelPostsModel::clear()
|
|||
emit channelPostsLoaded();
|
||||
}
|
||||
|
||||
bool operator<(const RsGxsChannelPost& p1,const RsGxsChannelPost& p2)
|
||||
{
|
||||
return p1.mMeta.mPublishTs > p2.mMeta.mPublishTs;
|
||||
}
|
||||
|
||||
void RsGxsChannelPostsModel::setPosts(const RsGxsChannelGroup& group, std::vector<RsGxsChannelPost>& posts)
|
||||
{
|
||||
preMods();
|
||||
|
@ -413,6 +418,8 @@ void RsGxsChannelPostsModel::setPosts(const RsGxsChannelGroup& group, std::vecto
|
|||
|
||||
createPostsArray(posts);
|
||||
|
||||
std::sort(mPosts.begin(),mPosts.end());
|
||||
|
||||
mFilteredPosts.clear();
|
||||
for(int i=0;i<mPosts.size();++i)
|
||||
mFilteredPosts.push_back(i);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue