mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-03 15:05:32 +00:00
Remove fetchCustomUpdate
This commit is contained in:
parent
4772868d6a
commit
6e918ffd68
@ -12,15 +12,12 @@ private const val FILE = "file"
|
|||||||
|
|
||||||
interface GithubPageServices {
|
interface GithubPageServices {
|
||||||
|
|
||||||
@GET("{$FILE}")
|
@GET
|
||||||
suspend fun fetchUpdateJSON(@Path(FILE) file: String): UpdateInfo
|
suspend fun fetchUpdateJSON(@Url file: String): UpdateInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
interface RawServices {
|
interface RawServices {
|
||||||
|
|
||||||
@GET
|
|
||||||
suspend fun fetchCustomUpdate(@Url url: String): UpdateInfo
|
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Streaming
|
@Streaming
|
||||||
suspend fun fetchFile(@Url url: String): ResponseBody
|
suspend fun fetchFile(@Url url: String): ResponseBody
|
||||||
|
@ -40,7 +40,7 @@ class NetworkService(
|
|||||||
private suspend fun fetchBetaUpdate() = pages.fetchUpdateJSON("beta.json")
|
private suspend fun fetchBetaUpdate() = pages.fetchUpdateJSON("beta.json")
|
||||||
private suspend fun fetchCanaryUpdate() = pages.fetchUpdateJSON("canary.json")
|
private suspend fun fetchCanaryUpdate() = pages.fetchUpdateJSON("canary.json")
|
||||||
private suspend fun fetchDebugUpdate() = pages.fetchUpdateJSON("debug.json")
|
private suspend fun fetchDebugUpdate() = pages.fetchUpdateJSON("debug.json")
|
||||||
private suspend fun fetchCustomUpdate(url: String) = raw.fetchCustomUpdate(url)
|
private suspend fun fetchCustomUpdate(url: String) = pages.fetchUpdateJSON(url)
|
||||||
|
|
||||||
private inline fun <T> safe(factory: () -> T): T? {
|
private inline fun <T> safe(factory: () -> T): T? {
|
||||||
return try {
|
return try {
|
||||||
|
Loading…
Reference in New Issue
Block a user