From d649a86195112a9c5f135d1fd7b66e9ffd15d43f Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Sat, 23 Nov 2019 17:53:31 -0700 Subject: Sort the files when presenting them during querying info --- src/downloadmanager.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/downloadmanager.cpp') 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) -- cgit v1.3.1