mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-25 04:35:12 +00:00
fixed version code comparison
This commit is contained in:
parent
9368af2187
commit
9db254d2f2
1 changed files with 2 additions and 2 deletions
|
@ -89,7 +89,7 @@ open class DataModel(
|
||||||
return when {
|
return when {
|
||||||
int1 == 0 -> ButtonTag.INSTALL
|
int1 == 0 -> ButtonTag.INSTALL
|
||||||
int2 > int1 -> ButtonTag.UPDATE
|
int2 > int1 -> ButtonTag.UPDATE
|
||||||
int2 == int1 || int1 > int2 -> ButtonTag.REINSTALL
|
int1 >= int2 -> ButtonTag.REINSTALL
|
||||||
else -> ButtonTag.INSTALL
|
else -> ButtonTag.INSTALL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,8 +100,8 @@ open class DataModel(
|
||||||
if (int2 != null && int1 != null) {
|
if (int2 != null && int1 != null) {
|
||||||
return when {
|
return when {
|
||||||
int1 == 0 -> ContextCompat.getDrawable(context, R.drawable.ic_app_download)!!
|
int1 == 0 -> ContextCompat.getDrawable(context, R.drawable.ic_app_download)!!
|
||||||
int1 == int2 -> ContextCompat.getDrawable(context, R.drawable.ic_app_reinstall)!!
|
|
||||||
int2 > int1 -> ContextCompat.getDrawable(context, R.drawable.ic_app_update)!!
|
int2 > int1 -> ContextCompat.getDrawable(context, R.drawable.ic_app_update)!!
|
||||||
|
int1 >= int2 -> ContextCompat.getDrawable(context, R.drawable.ic_app_reinstall)!!
|
||||||
else -> ContextCompat.getDrawable(context, R.drawable.ic_app_download)!!
|
else -> ContextCompat.getDrawable(context, R.drawable.ic_app_download)!!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue