mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fix 'download all' button for forum.
Now all file links are opened in one collection dialog instead of each link in one separate dialog.
This commit is contained in:
parent
b99a1a56ef
commit
49b4057522
@ -1220,6 +1220,11 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
||||
errorList << &fileExist << &personExist << &personFailed << &personNotFound << &forumUnknown << &forumMsgUnknown << &channelUnknown << &channelMsgUnknown << &postedUnknown << &postedMsgUnknown << &messageReceipientNotAccepted << &messageReceipientUnknown;
|
||||
// not needed: forumFound, channelFound, messageStarted
|
||||
|
||||
// we want to merge all single file links into one collection
|
||||
// if a collection tree link is found it is processed independen for the other file links
|
||||
RsCollection col;
|
||||
bool fileLinkFound = false;
|
||||
|
||||
for (linkIt = links.begin(); linkIt != links.end(); ++linkIt) {
|
||||
const RetroShareLink &link = *linkIt;
|
||||
|
||||
@ -1365,11 +1370,8 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
||||
break;
|
||||
|
||||
case TYPE_FILE:
|
||||
{
|
||||
RsCollection col ;
|
||||
col.merge_in(link.name(),link.size(),RsFileHash(link.hash().toStdString())) ;
|
||||
col.downloadFiles();
|
||||
}
|
||||
fileLinkFound = true;
|
||||
break;
|
||||
|
||||
|
||||
@ -1557,6 +1559,10 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
||||
}
|
||||
}
|
||||
|
||||
// were single file links found?
|
||||
if (fileLinkFound)
|
||||
col.downloadFiles();
|
||||
|
||||
int countProcessed = 0;
|
||||
int countError = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user