mirror of
https://github.com/fankes/TSBattery.git
synced 2025-09-04 17:55:30 +08:00
Merge code
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user