This commit is contained in:
Pritimay Sarkar
2023-10-29 12:17:00 +05:30
parent 7ece136cb5
commit 9d06a77091

View File

@@ -243,8 +243,6 @@ class HemoCubeFragment : Fragment() {
resultData += stringData resultData += stringData
when { when {
stringData.contains("ERROR 500") -> showError500Dialog()
stringData.contains("ERROR 501") -> showError501Dialog()
stringData.contains("#Buffer Completed") -> showStartSampleDialog() stringData.contains("#Buffer Completed") -> showStartSampleDialog()
stringData.contains("#Sample Completed") -> { stringData.contains("#Sample Completed") -> {
fetchResult() fetchResult()
@@ -289,23 +287,6 @@ class HemoCubeFragment : Fragment() {
} }
} }
private fun showError500Dialog() {
UIUtils.createAlertDialog(requireContext(),
"BUFFER ERROR",
"Do you want to continue with existing buffer?",
getString(R.string.noo),
"Yes",
object : MyDialogListener {
override fun onClickNegativeButton() {}
override fun onClickPositiveButton() {
listenToHemoCube()
startBufferProcess()
}
})
}
fun handleBackButtonPress() { fun handleBackButtonPress() {
if (isTestOngoing) { if (isTestOngoing) {
// If the test is ongoing, don't allow the back button action // If the test is ongoing, don't allow the back button action
@@ -318,23 +299,6 @@ class HemoCubeFragment : Fragment() {
} }
} }
private fun showError501Dialog() {
UIUtils.createAlertDialog(requireContext(),
"SAMPLE ERROR",
"Do you want to continue with Sample?",
getString(R.string.noo),
"Yes",
object : MyDialogListener {
override fun onClickNegativeButton() {}
override fun onClickPositiveButton() {
listenToHemoCube()
startSampleProcess()
}
})
}
private fun showStartSampleDialog() { private fun showStartSampleDialog() {
activity?.runOnUiThread { activity?.runOnUiThread {
UIUtils.createAlertDialog(requireContext(), UIUtils.createAlertDialog(requireContext(),