mirror of
https://github.com/fankes/TSBattery.git
synced 2025-09-06 10:45:53 +08:00
Merge code
This commit is contained in:
@@ -35,10 +35,10 @@ import java.io.Serializable
|
|||||||
object GithubReleaseTool {
|
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) {
|
fun checkingForUpdate(context: Context, version: String, it: (String, () -> Unit) -> Unit) = checkingInternetConnect(context) {
|
||||||
OkHttpClient().newBuilder().build().newCall(
|
OkHttpClient().newBuilder().build().newCall(
|
||||||
Request.Builder()
|
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()
|
.get()
|
||||||
.build()
|
.build()
|
||||||
).enqueue(object : Callback {
|
).enqueue(object : Callback {
|
||||||
|
Reference in New Issue
Block a user