feat: refs #8212 showWarningUdate
This commit is contained in:
parent
e0b148ddfd
commit
54687e2e05
|
@ -157,6 +157,7 @@ class LoginFragment :
|
||||||
}
|
}
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setSwitch() {
|
private fun setSwitch() {
|
||||||
|
@ -325,31 +326,36 @@ class LoginFragment :
|
||||||
if (binding.edittextServer.text.toString() == "Producción") {
|
if (binding.edittextServer.text.toString() == "Producción") {
|
||||||
mobileApplication.clearApplicationData()
|
mobileApplication.clearApplicationData()
|
||||||
}
|
}
|
||||||
customDialog.setTitle(getString(R.string.Actualizar))
|
//Tarea 8212 serialMuber is obtaines from back when PDA is registered, updated scaleFusion
|
||||||
.setDescription(getString(R.string.updatemng)).setOkButton(
|
if (it.serialNumber.isEmpty()) {
|
||||||
getString(
|
customDialog.setTitle(getString(R.string.Actualizar))
|
||||||
R.string.Actualizar
|
.setDescription(getString(R.string.updatemng)).setOkButton(
|
||||||
)
|
getString(
|
||||||
) {
|
R.string.Actualizar
|
||||||
try {
|
)
|
||||||
val openURL = Intent(Intent.ACTION_VIEW)
|
) {
|
||||||
openURL.data = Uri.parse(it.url)
|
try {
|
||||||
startActivity(openURL)
|
val openURL = Intent(Intent.ACTION_VIEW)
|
||||||
} catch (ex: Exception) {
|
openURL.data = Uri.parse(it.url)
|
||||||
getString(R.string.problemUpdate).toast(requireActivity())
|
startActivity(openURL)
|
||||||
|
} catch (ex: Exception) {
|
||||||
|
getString(R.string.problemUpdate).toast(requireActivity())
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (it.isVersionCritical) {
|
||||||
|
customDialog.setDescription(getString(R.string.updatecritical))
|
||||||
|
} else {
|
||||||
|
customDialog.setKoButton(getString(R.string.cancel)) {
|
||||||
|
customDialog.dismiss()
|
||||||
|
goToMain()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (it.isVersionCritical) {
|
customDialog.show()
|
||||||
customDialog.setDescription(getString(R.string.updatecritical))
|
|
||||||
} else {
|
} else {
|
||||||
customDialog.setKoButton(getString(R.string.cancel)) {
|
goToMain()
|
||||||
customDialog.dismiss()
|
|
||||||
goToMain()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
customDialog.show()
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue