release 2.1.90 with upload flags
This commit is contained in:
@@ -16,11 +16,11 @@ android {
|
||||
|
||||
// prod - production, preprod - preproduction, quality - qc, dev - development
|
||||
defaultConfig {
|
||||
applicationId "in.sminnovations.hpostesting.quality"
|
||||
applicationId "in.sminnovations.hpostesting.preprod"
|
||||
minSdk 21
|
||||
targetSdk 34
|
||||
versionCode 88
|
||||
versionName "2.1.88"
|
||||
versionCode 90
|
||||
versionName "2.1.90"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
@@ -65,6 +65,8 @@ class HemoCubeFragment : Fragment() {
|
||||
private var testStatusCode = 0.0
|
||||
private var repeatReadingCount = 0
|
||||
private var readingsPerSample = Constants.READINGS_PER_SAMPLE
|
||||
private var uploadedToCloud = false
|
||||
private var uploadedToMolbio = false
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?,
|
||||
@@ -140,10 +142,12 @@ class HemoCubeFragment : Fragment() {
|
||||
private fun observeViewModel() {
|
||||
hemoCubeViewModel.fireBaseUpload.observe(viewLifecycleOwner) { result ->
|
||||
if (result == "Success") {
|
||||
uploadedToCloud = true
|
||||
showToast(R.string.test_upload)
|
||||
hemoCubeViewModel.resultUpload.observe(viewLifecycleOwner) {
|
||||
when (it) {
|
||||
is Result.Success -> {
|
||||
uploadedToMolbio = true
|
||||
if (Constants.MOLBIO_INTERGATION) {
|
||||
it.data.data?.get(0)?.rawData?.let { it1 ->
|
||||
hemoCubeViewModel.updateMolbioFlag(
|
||||
@@ -160,6 +164,7 @@ class HemoCubeFragment : Fragment() {
|
||||
Toast.makeText(activity, "An error occurred: $message", Toast.LENGTH_LONG)
|
||||
.show()
|
||||
}
|
||||
handleReadingFinish()
|
||||
}
|
||||
|
||||
else -> {}
|
||||
@@ -224,7 +229,7 @@ class HemoCubeFragment : Fragment() {
|
||||
}
|
||||
|
||||
private fun handleReadingFinish() {
|
||||
if (allReadingsComplete()) {
|
||||
if (allReadingsComplete() && uploadedToCloud) {
|
||||
activity?.runOnUiThread {
|
||||
binding.btnSubmit.visibility = View.GONE
|
||||
val i = Intent(
|
||||
|
||||
Reference in New Issue
Block a user