diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2019-11-23 17:53:31 -0700 |
|---|---|---|
| committer | LostDragonist <lost.dragonist@gmail.com> | 2019-11-23 17:53:31 -0700 |
| commit | d649a86195112a9c5f135d1fd7b66e9ffd15d43f (patch) | |
| tree | 7cc2de25a5b98c99039ce14d2e9dff05ddd7d1d7 /src/downloadmanager.cpp | |
| parent | 70b966dc0e0dd65f574538b8f09e0e36894fda7d (diff) | |
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) |
