diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2019-11-23 17:56:15 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-23 17:56:15 -0700 |
| commit | 5f165b80e8035bafa15fe5a534726733836a3dd7 (patch) | |
| tree | 39174d2440e7351c332981bc622fec935de90467 /src/downloadmanager.cpp | |
| parent | 981c1b773966a30374a90bc21d6ebd9c7bf86040 (diff) | |
| parent | d649a86195112a9c5f135d1fd7b66e9ffd15d43f (diff) | |
Merge pull request #897 from LostDragonist/Develop
Sort the files when presenting them during querying info
Diffstat (limited to 'src/downloadmanager.cpp')
| -rw-r--r-- | src/downloadmanager.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index b4a7b57d..c84d4bd4 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -1606,6 +1606,8 @@ void DownloadManager::nxmFilesAvailable(QString, int, QVariant userData, QVarian emit showMessage(tr("No matching file found on Nexus! Maybe this file is no longer available or it was renamed?")); } else { SelectionDialog selection(tr("No file on Nexus matches the selected file by name. Please manually choose the correct one.")); + std::sort(files.begin(), files.end(), [](const QVariant& lhs, const QVariant& rhs) + {return lhs.toMap()["uploaded_timestamp"].toInt() > rhs.toMap()["uploaded_timestamp"].toInt();}); for (QVariant file : files) { QVariantMap fileInfo = file.toMap(); if (fileInfo["category_id"].toInt() != 6) |
