diff --git a/core/src/com/unciv/ui/pickerscreens/ModManagementOptions.kt b/core/src/com/unciv/ui/pickerscreens/ModManagementOptions.kt index 0ea5cc3e10..e284d4128d 100644 --- a/core/src/com/unciv/ui/pickerscreens/ModManagementOptions.kt +++ b/core/src/com/unciv/ui/pickerscreens/ModManagementOptions.kt @@ -184,7 +184,7 @@ class ModUIData( state.hasUpdate = isUpdated } - fun lastUpdated() = ruleset?.modOptions?.lastUpdated ?: repo?.updated_at ?: "" + fun lastUpdated() = ruleset?.modOptions?.lastUpdated ?: repo?.pushed_at ?: "" fun stargazers() = repo?.stargazers_count ?: 0 fun author() = ruleset?.modOptions?.author ?: repo?.owner?.login ?: "" fun matchesFilter(filterText: String): Boolean = when { diff --git a/core/src/com/unciv/ui/pickerscreens/ModManagementScreen.kt b/core/src/com/unciv/ui/pickerscreens/ModManagementScreen.kt index 7704c75056..95943d2963 100644 --- a/core/src/com/unciv/ui/pickerscreens/ModManagementScreen.kt +++ b/core/src/com/unciv/ui/pickerscreens/ModManagementScreen.kt @@ -224,7 +224,7 @@ class ModManagementScreen( val installedMod = RulesetCache.values.firstOrNull { it.name == repo.name } val isUpdatedVersionOfInstalledMod = installedMod?.modOptions?.let { - it.lastUpdated != "" && it.lastUpdated != repo.updated_at + it.lastUpdated != "" && it.lastUpdated != repo.pushed_at } == true if (installedMod != null) { @@ -305,7 +305,7 @@ class ModManagementScreen( * @param repo: the repository instance as received from the GitHub api */ private fun addModInfoToActionTable(repo: Github.Repo) { - addModInfoToActionTable(repo.name, repo.html_url, repo.updated_at, repo.owner.login, repo.size) + addModInfoToActionTable(repo.name, repo.html_url, repo.pushed_at, repo.owner.login, repo.size) } /** Recreate the information part of the right-hand column * @param modName: The mod name (name from the RuleSet) @@ -419,7 +419,7 @@ class ModManagementScreen( val modOptionsFile = modFolder.child("jsons/ModOptions.json") val modOptions = if (modOptionsFile.exists()) JsonParser().getFromJson(ModOptions::class.java, modOptionsFile) else ModOptions() modOptions.modUrl = repo.html_url - modOptions.lastUpdated = repo.updated_at + modOptions.lastUpdated = repo.pushed_at modOptions.author = repo.owner.login modOptions.modSize = repo.size Json().toJson(modOptions, modOptionsFile) diff --git a/core/src/com/unciv/ui/worldscreen/mainmenu/GitHub.kt b/core/src/com/unciv/ui/worldscreen/mainmenu/GitHub.kt index 7e70739846..1a7760df58 100644 --- a/core/src/com/unciv/ui/worldscreen/mainmenu/GitHub.kt +++ b/core/src/com/unciv/ui/worldscreen/mainmenu/GitHub.kt @@ -259,8 +259,7 @@ object Github { var stargazers_count = 0 var default_branch = "" var html_url = "" - var updated_at = "" - //var pushed_at = "" // if > updated_at might indicate an update soon? + var pushed_at = "" // don't use updated_at - see https://github.com/yairm210/Unciv/issues/6106 var size = 0 //var stargazers_url = "" //var homepage: String? = null // might use instead of go to repo?