v2.13.1
This commit is contained in:
@@ -23,8 +23,8 @@ android {
|
|||||||
minSdk = 21
|
minSdk = 21
|
||||||
targetSdk = 29
|
targetSdk = 29
|
||||||
resourceConfigurations.addAll(arrayOf("it", "ru", "zh-rCN", "zh-rTW"))
|
resourceConfigurations.addAll(arrayOf("it", "ru", "zh-rCN", "zh-rTW"))
|
||||||
versionCode = 280
|
versionCode = 282
|
||||||
versionName = "2.13.0"
|
versionName = "2.13.1"
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
javaCompileOptions.annotationProcessorOptions.arguments.apply {
|
javaCompileOptions.annotationProcessorOptions.arguments.apply {
|
||||||
put("room.expandProjection", "true")
|
put("room.expandProjection", "true")
|
||||||
|
|||||||
@@ -78,13 +78,13 @@ object UpdateChecker {
|
|||||||
app.pref.edit {
|
app.pref.edit {
|
||||||
try {
|
try {
|
||||||
conn.setRequestProperty("Accept", "application/vnd.github.v3+json")
|
conn.setRequestProperty("Accept", "application/vnd.github.v3+json")
|
||||||
reset = conn.getHeaderField("X-RateLimit-Reset")?.toLongOrNull()
|
|
||||||
val update = findUpdate(JSONArray(withContext(Dispatchers.IO) {
|
val update = findUpdate(JSONArray(withContext(Dispatchers.IO) {
|
||||||
|
reset = conn.getHeaderField("X-RateLimit-Reset")?.toLongOrNull()
|
||||||
conn.inputStream.bufferedReader().readText()
|
conn.inputStream.bufferedReader().readText()
|
||||||
}))
|
}))
|
||||||
putLong(KEY_PUBLISHED, if (update == null) -1 else {
|
putString(KEY_VERSION, update?.let {
|
||||||
putString(KEY_VERSION, update.message)
|
putLong(KEY_PUBLISHED, update.published)
|
||||||
update.published
|
it.message
|
||||||
})
|
})
|
||||||
emit(update)
|
emit(update)
|
||||||
} catch (_: CancellationException) {
|
} catch (_: CancellationException) {
|
||||||
|
|||||||
Reference in New Issue
Block a user