committed changes
This commit is contained in:
@@ -190,14 +190,14 @@ class UserListAdapter(
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
userCard.setOnClickListener {
|
userCard.setOnClickListener {
|
||||||
// if (batLevel < 40) {
|
if (batLevel < 40) {
|
||||||
// Toast.makeText(
|
Toast.makeText(
|
||||||
// view.context,
|
view.context,
|
||||||
// "Battery level is low than 40%, please charge the device to continue testing",
|
"Battery level is low than 40%, please charge the device to continue testing",
|
||||||
// Toast.LENGTH_SHORT
|
Toast.LENGTH_SHORT
|
||||||
// ).show()
|
).show()
|
||||||
// return@setOnClickListener
|
return@setOnClickListener
|
||||||
// }
|
}
|
||||||
if (model.testStatus != null) {
|
if (model.testStatus != null) {
|
||||||
if (model.testStatus!!) {
|
if (model.testStatus!!) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
|
|||||||
@@ -137,10 +137,10 @@ class HomeFragment : Fragment() {
|
|||||||
val dateFormat = SimpleDateFormat("yyyy-MM-dd")
|
val dateFormat = SimpleDateFormat("yyyy-MM-dd")
|
||||||
val currentDate = Date()
|
val currentDate = Date()
|
||||||
val formattedDate = dateFormat.format(currentDate)
|
val formattedDate = dateFormat.format(currentDate)
|
||||||
// val query = Firebase.firestore.collection("patientData")
|
val query = Firebase.firestore.collection("patientData")
|
||||||
// .whereGreaterThanOrEqualTo("createdAt", formattedDate)
|
.whereGreaterThanOrEqualTo("createdAt", formattedDate)
|
||||||
// .orderBy("createdAt", Query.Direction.DESCENDING)
|
.orderBy("createdAt", Query.Direction.DESCENDING)
|
||||||
val query = Firebase.firestore.collection("patientData").whereEqualTo("testStatus", false)
|
// val query = Firebase.firestore.collection("patientData").whereEqualTo("testStatus", false)
|
||||||
query.get().addOnSuccessListener {
|
query.get().addOnSuccessListener {
|
||||||
if (it.documents.isEmpty()) {
|
if (it.documents.isEmpty()) {
|
||||||
binding.pendingTest.visibility = View.VISIBLE
|
binding.pendingTest.visibility = View.VISIBLE
|
||||||
|
|||||||
@@ -106,13 +106,10 @@ class HemoCubeFragment : Fragment() {
|
|||||||
} else {
|
} else {
|
||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
binding.tvSubtitle4.visibility = View.VISIBLE
|
binding.tvSubtitle4.visibility = View.VISIBLE
|
||||||
// binding.tvSubtitle4.text = "Buffer Started"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
checkAndStartProcess()
|
checkAndStartProcess()
|
||||||
it.visibility = View.GONE
|
|
||||||
}
|
}
|
||||||
|
it.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -319,7 +316,6 @@ class HemoCubeFragment : Fragment() {
|
|||||||
|
|
||||||
stringData.contains("#SC") -> {
|
stringData.contains("#SC") -> {
|
||||||
binding.tvSubtitle4.text = "Sample Completed"
|
binding.tvSubtitle4.text = "Sample Completed"
|
||||||
binding.btnSubmit.visibility = View.VISIBLE
|
|
||||||
fetchResult()
|
fetchResult()
|
||||||
testingTrace.stop()
|
testingTrace.stop()
|
||||||
}
|
}
|
||||||
@@ -446,12 +442,12 @@ class HemoCubeFragment : Fragment() {
|
|||||||
apply()
|
apply()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
binding.btnSubmit.visibility = View.VISIBLE
|
binding.btnSubmit.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
binding.btnSubmit.isEnabled = true
|
binding.btnSubmit.isEnabled = true
|
||||||
binding.btnSubmit.isClickable = true
|
binding.btnSubmit.isClickable = true
|
||||||
binding.clParent.setBackgroundColor(Color.parseColor("#edfffd"))
|
binding.clParent.setBackgroundColor(Color.parseColor("#edfffd"))
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
|
|||||||
Reference in New Issue
Block a user