mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-06-30 17:34:39 -05:00
Switch to a new Ktlint Formatter (#705)
* Switch to new Ktlint plugin * Add ktlintCheck to PR builds * Run formatter * Put ktlint version in libs toml * Fix lint * Use Zip4Java from libs.toml
This commit is contained in:
@@ -19,7 +19,7 @@ data class UpdateDataClass(
|
||||
/** [channel] mirrors [suwayomi.tachidesk.server.BuildConfig.BUILD_TYPE] */
|
||||
val channel: String,
|
||||
val tag: String,
|
||||
val url: String
|
||||
val url: String,
|
||||
)
|
||||
|
||||
object AppUpdate {
|
||||
@@ -30,29 +30,31 @@ object AppUpdate {
|
||||
private val network: NetworkHelper by injectLazy()
|
||||
|
||||
suspend fun checkUpdate(): List<UpdateDataClass> {
|
||||
val stableJson = json.parseToJsonElement(
|
||||
network.client.newCall(
|
||||
GET(LATEST_STABLE_CHANNEL_URL)
|
||||
).await().body.string()
|
||||
).jsonObject
|
||||
val stableJson =
|
||||
json.parseToJsonElement(
|
||||
network.client.newCall(
|
||||
GET(LATEST_STABLE_CHANNEL_URL),
|
||||
).await().body.string(),
|
||||
).jsonObject
|
||||
|
||||
val previewJson = json.parseToJsonElement(
|
||||
network.client.newCall(
|
||||
GET(LATEST_PREVIEW_CHANNEL_URL)
|
||||
).await().body.string()
|
||||
).jsonObject
|
||||
val previewJson =
|
||||
json.parseToJsonElement(
|
||||
network.client.newCall(
|
||||
GET(LATEST_PREVIEW_CHANNEL_URL),
|
||||
).await().body.string(),
|
||||
).jsonObject
|
||||
|
||||
return listOf(
|
||||
UpdateDataClass(
|
||||
"Stable",
|
||||
stableJson["tag_name"]!!.jsonPrimitive.content,
|
||||
stableJson["html_url"]!!.jsonPrimitive.content
|
||||
stableJson["html_url"]!!.jsonPrimitive.content,
|
||||
),
|
||||
UpdateDataClass(
|
||||
"Preview",
|
||||
previewJson["tag_name"]!!.jsonPrimitive.content,
|
||||
previewJson["html_url"]!!.jsonPrimitive.content
|
||||
)
|
||||
previewJson["html_url"]!!.jsonPrimitive.content,
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user