mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-17 10:59:38 -04:00
added list of files for the whole channel
This commit is contained in:
parent
591ffc2fa7
commit
944c5b3592
7 changed files with 67 additions and 34 deletions
retroshare-gui/src/gui/gxschannels
|
@ -71,6 +71,22 @@ void RsGxsChannelPostsModel::postMods()
|
|||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mPosts.size(),mColumns-1,(void*)NULL));
|
||||
}
|
||||
|
||||
void RsGxsChannelPostsModel::getFilesList(std::list<RsGxsFile>& files)
|
||||
{
|
||||
// We use an intermediate map so as to remove duplicates
|
||||
|
||||
std::map<RsFileHash,RsGxsFile> files_map;
|
||||
|
||||
for(uint32_t i=1;i<mPosts.size();++i)
|
||||
for(auto& file:mPosts[i].mFiles)
|
||||
files_map[file.mHash] = file;
|
||||
|
||||
files.clear();
|
||||
|
||||
for(auto& it:files_map)
|
||||
files.push_back(it.second);
|
||||
}
|
||||
|
||||
void RsGxsChannelPostsModel::setTreeMode(TreeMode mode)
|
||||
{
|
||||
if(mode == mTreeMode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue