diff options
| author | Al <26797547+Al12rs@users.noreply.github.com> | 2026-05-04 04:47:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-03 21:47:20 -0500 |
| commit | ca7a149874e99a8f401cb30c430f58a48be4c642 (patch) | |
| tree | 9764a43289eab32bfb838aa91234ddf87fae4eb0 /src/nexusinterface.h | |
| parent | ef7499aade74a148416b5fde7e8c03a75ea381c3 (diff) | |
Improve mod update check accuracy (#2385)
* Index API response into lookup maps
* extract new findLatestActiveSuccessor method from update check function
* extract method to check if a file is active
* use new isActiveFileStatus in modInfoRegular
* fix bug when merging during mod install
* remember ordering of installed nexus file ids
* refactor update check logic to prioritize Nexus file IDs over filenames
* refactor nxmUpdatesAvailable to simplify update checking logic
* refactor update check logic to find Nexus file IDs by filename and streamline successor retrieval
* refactor update checking to streamline version resolution and improve successor retrieval
Diffstat (limited to 'src/nexusinterface.h')
| -rw-r--r-- | src/nexusinterface.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/nexusinterface.h b/src/nexusinterface.h index f6efef1d..dd9650b1 100644 --- a/src/nexusinterface.h +++ b/src/nexusinterface.h @@ -183,6 +183,31 @@ public: // listed we can assume they were hidden. }; + /** + * @brief Whether a Nexus file category represents a file that is still + * listed and considered current on the mod page. + * + * Inactive (false) refers to files that have been marked as obsolete or have been + * removed. + */ + static bool isActiveFileStatus(int status) + { + switch (status) { + case FileStatus::MAIN: + case FileStatus::UPDATE: + case FileStatus::OPTIONAL_FILE: + case FileStatus::MISCELLANEOUS: + return true; + case FileStatus::OLD_VERSION: + case FileStatus::REMOVED: + case FileStatus::ARCHIVED: + case FileStatus::ARCHIVED_HIDDEN: + return false; + default: + return false; + } + } + public: static APILimits defaultAPILimits(); static APILimits parseLimits(const QNetworkReply* reply); |
