Fixed updating
This commit is contained in:
parent
00623e7cd7
commit
ab7acb9e21
1 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@ class MainActivity : Activity() {
|
||||||
val stringRequest = StringRequest(
|
val stringRequest = StringRequest(
|
||||||
Request.Method.GET, url,
|
Request.Method.GET, url,
|
||||||
{ response ->
|
{ response ->
|
||||||
if(response != BuildConfig.VERSION_CODE.toString())
|
if(Integer.parseInt(response.trim()) != BuildConfig.VERSION_CODE)
|
||||||
{
|
{
|
||||||
val madb = MaterialAlertDialogBuilder(this)
|
val madb = MaterialAlertDialogBuilder(this)
|
||||||
madb.setTitle(getString(R.string.vendroid_update_available))
|
madb.setTitle(getString(R.string.vendroid_update_available))
|
||||||
|
@ -50,7 +50,7 @@ class MainActivity : Activity() {
|
||||||
madb.setNegativeButton(getString(R.string.later), DialogInterface.OnClickListener { _, _ -> })
|
madb.setNegativeButton(getString(R.string.later), DialogInterface.OnClickListener { _, _ -> })
|
||||||
madb.show()
|
madb.show()
|
||||||
}
|
}
|
||||||
if(ignoreSetting && response == BuildConfig.VERSION_CODE.toString()) {
|
if(ignoreSetting && Integer.parseInt(response.trim()) == BuildConfig.VERSION_CODE) {
|
||||||
showDiscordToast("No updates available", "MESSAGE")
|
showDiscordToast("No updates available", "MESSAGE")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue