Add Install Date column to GUI mod list #2514
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
CKAN tracks the date and time when a mod was installed, but this information is not shown in GUI. It could be useful to be able to sort installed mods so you can see the order in which they were installed.
Changes
Now a new sortable Install Date column shows when mods were installed:
To achieve this, you can now construct a
GUIMod
object from anInstalledModule
, or aCkanModule
, or astring
identifier. The constructors are layered by: this()
calls so the simplest initialization is done first, then supplemented by whatever additional info is at hand. TheInstalledModule
-based constructor populates a newInstallDate
property.MainModList._UpdateModsList
is updated to generateGUIMod
objects based onInstalledModule
objects when they are available.The logic for making one row of the mod list is now split out from
MainModList.ConstructModList
into a new privateMakeRow
function.Fixes #954. Fixes #1046. Fixes #1933.