Merge code

This commit is contained in:
2022-03-22 01:32:11 +08:00
parent 18b6b907bf
commit 3ac6647a25

View File

@@ -35,10 +35,10 @@ import java.io.Serializable
object GithubReleaseTool {
/** 仓库作者 */
private const val repoAuthor = "fankes"
private const val REPO_AUTHOR = "fankes"
/** 仓库名称 */
private const val repoName = "TSBattery"
private const val REPO_NAME = "TSBattery"
/**
* 获取最新版本信息
@@ -49,7 +49,7 @@ object GithubReleaseTool {
fun checkingForUpdate(context: Context, version: String, it: (String, () -> Unit) -> Unit) = checkingInternetConnect(context) {
OkHttpClient().newBuilder().build().newCall(
Request.Builder()
.url("https://api.github.com/repos/$repoAuthor/$repoName/releases/latest")
.url("https://api.github.com/repos/$REPO_AUTHOR/$REPO_NAME/releases/latest")
.get()
.build()
).enqueue(object : Callback {