1
0
Fork 0

Fixed updating

This commit is contained in:
nin0dev 2024-04-28 08:18:29 -04:00
parent 00623e7cd7
commit ab7acb9e21

View file

@ -38,7 +38,7 @@ class MainActivity : Activity() {
val stringRequest = StringRequest(
Request.Method.GET, url,
{ response ->
if(response != BuildConfig.VERSION_CODE.toString())
if(Integer.parseInt(response.trim()) != BuildConfig.VERSION_CODE)
{
val madb = MaterialAlertDialogBuilder(this)
madb.setTitle(getString(R.string.vendroid_update_available))
@ -50,7 +50,7 @@ class MainActivity : Activity() {
madb.setNegativeButton(getString(R.string.later), DialogInterface.OnClickListener { _, _ -> })
madb.show()
}
if(ignoreSetting && response == BuildConfig.VERSION_CODE.toString()) {
if(ignoreSetting && Integer.parseInt(response.trim()) == BuildConfig.VERSION_CODE) {
showDiscordToast("No updates available", "MESSAGE")
}
},