Compare with tag_name instead

This commit is contained in:
Mygod
2021-10-25 06:19:27 +08:00
parent 537ef134c1
commit 7b8957b781

View File

@@ -49,7 +49,7 @@ object UpdateChecker {
val response = JSONObject(withContext(Dispatchers.IO) { val response = JSONObject(withContext(Dispatchers.IO) {
conn.inputStream.bufferedReader().readText() conn.inputStream.bufferedReader().readText()
}) })
val version = response.getString("name") val version = response.getString("tag_name")
val published = Instant.parse(response.getString("published_at")).toEpochMilli() val published = Instant.parse(response.getString("published_at")).toEpochMilli()
app.pref.edit { app.pref.edit {
putLong(KEY_LAST_FETCHED, System.currentTimeMillis()) putLong(KEY_LAST_FETCHED, System.currentTimeMillis())