Flushed Kit number, Kit count and Buffer value for new kit
This commit is contained in:
@@ -55,6 +55,14 @@ class KitScanActivity : AppCompatActivity() {
|
||||
if (checkHemoCubeKitData()) {
|
||||
DataHolder.selectedTest!!.kitSerial =
|
||||
sharedPreference.getString(Constants.KIT_NUMBER, "").toString()
|
||||
moveToNext()
|
||||
} else {
|
||||
with(sharedPreference.edit()) {
|
||||
putString(Constants.KIT_NUMBER, "")
|
||||
putInt(Constants.KIT_COUNT, 0)
|
||||
putInt(Constants.BUFFER_VALUE, 0)
|
||||
apply()
|
||||
}
|
||||
}
|
||||
|
||||
binding.nameEditText.setText("SMI/SC/")
|
||||
@@ -86,6 +94,7 @@ class KitScanActivity : AppCompatActivity() {
|
||||
private fun checkHemoCubeKitData(): Boolean {
|
||||
return sharedPreference.getString(Constants.KIT_NUMBER, "")
|
||||
?.isNotBlank() == true || sharedPreference.getInt(Constants.KIT_COUNT, 0) > 0
|
||||
|| sharedPreference.getInt(Constants.KIT_COUNT, 0) < 35
|
||||
}
|
||||
|
||||
private fun isSerialValid(s: String): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user