release 2.1.90 with upload flags

This commit is contained in:
Pritimay Sarkar
2024-01-14 08:50:44 +05:30
parent 69a0ef68c5
commit 5a309e1b24
2 changed files with 9 additions and 4 deletions

View File

@@ -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"
}

View File

@@ -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(