Visually indicate to users that they should click Refresh #4133
+67
−23
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.
Background
Since its creation (see #2177), ConsoleUI has shown the time since the last repo refresh in its bottom right corner:
Problem
Lately, that text indicates the last time a mod was installed or uninstalled, not the last repo refresh.
Cause
As of #3904, the available modules are no longer stored in
CKAN/registry.json
, which is no longer written after a repo update, but this is the file that ConsoleUI checks for the last update timestamp.Motivation
@JonnyOThan reports (see #4130 (comment)):
GUI users apparently need a cue/reminder to update their metadata.
Changes
RepositoryDataManager
provides:LastUpdate
function that returns the time since the last updateTimeTillStale
andTimeTillVeryStale
properties indicating when metadata should be considered a little stale (3 days) and when it should be considered very stale (14 days)LastUpdate
to get the last refresh timestamp instead of looking atCKAN/registry.json
Fixes #4130.