0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-11-18 01:05:10 +00:00

removed useless function

This commit is contained in:
X1nto 2020-07-11 17:42:47 +04:00
parent 6d24a08075
commit 4faf4f6c27

View file

@ -46,12 +46,10 @@ object InternetTools {
client.newCall(request).enqueue(object : Callback { client.newCall(request).enqueue(object : Callback {
override fun onFailure(call: Call, e: IOException) { override fun onFailure(call: Call, e: IOException) {
toReturn = 0 toReturn = 0
returnVal(toReturn)
} }
override fun onResponse(call: Call, response: Response) { override fun onResponse(call: Call, response: Response) {
toReturn = JSONObject(response.body?.string()!!).getInt(obj) toReturn = JSONObject(response.body?.string()!!).getInt(obj)
returnVal(toReturn)
Log.d("VMResponse", toReturn.toString()) Log.d("VMResponse", toReturn.toString())
} }
}) })
@ -82,10 +80,6 @@ object InternetTools {
return toReturn return toReturn
} }
fun returnVal(value: Any): Any {
return value
}
fun isUpdateAvailable(): Boolean { fun isUpdateAvailable(): Boolean {
val checkUrl = GetJson().AsJSONObject("https://x1nto.github.io/VancedFiles/manager.json") val checkUrl = GetJson().AsJSONObject("https://x1nto.github.io/VancedFiles/manager.json")
val remoteVersion = checkUrl.get("versionCode").asInt val remoteVersion = checkUrl.get("versionCode").asInt