mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-20 09:17:47 +07:00
Added 'last updated time' to mod description
This commit is contained in:
parent
72f63b7ba1
commit
146a806b08
@ -11,6 +11,9 @@ import com.unciv.models.ruleset.RulesetCache
|
||||
import com.unciv.models.translations.tr
|
||||
import com.unciv.ui.utils.*
|
||||
import com.unciv.ui.worldscreen.mainmenu.Github
|
||||
import java.time.LocalDateTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.util.*
|
||||
import kotlin.concurrent.thread
|
||||
|
||||
class ModManagementScreen: PickerScreen() {
|
||||
@ -74,7 +77,10 @@ class ModManagementScreen: PickerScreen() {
|
||||
modActionTable.clear()
|
||||
modActionTable.add("Open Github page".toTextButton().onClick {
|
||||
Gdx.net.openURI(repo.html_url)
|
||||
})
|
||||
}).row()
|
||||
val updateString = "Last updated at: "+ LocalDateTime.parse(repo.updated_at, DateTimeFormatter.ISO_DATE_TIME)
|
||||
.toLocalDate().toString()
|
||||
modActionTable.add(updateString.toLabel())
|
||||
}
|
||||
downloadTable.add(downloadButton).row()
|
||||
}
|
||||
|
@ -9,8 +9,11 @@ import java.io.*
|
||||
import java.net.HttpURLConnection
|
||||
import java.net.URL
|
||||
import java.nio.charset.Charset
|
||||
import java.time.DateTimeException
|
||||
import java.util.*
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipFile
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
|
||||
object DropBox {
|
||||
@ -197,6 +200,7 @@ object Github {
|
||||
var stargazers_count = 0
|
||||
var default_branch = ""
|
||||
var html_url = ""
|
||||
var updated_at = ""
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user