Remove the amount of carbs required from the main overview if a carb treatment has been made after APS run
This commit is contained in:
parent
d04cf567b8
commit
2391ebe399
1 changed files with 6 additions and 3 deletions
|
@ -748,12 +748,15 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
||||||
|
|
||||||
if (config.APS && lastRun?.constraintsProcessed != null) {
|
if (config.APS && lastRun?.constraintsProcessed != null) {
|
||||||
if (lastRun.constraintsProcessed!!.carbsReq > 0) {
|
if (lastRun.constraintsProcessed!!.carbsReq > 0) {
|
||||||
overview_cob?.text = cobText + " | " + lastRun.constraintsProcessed!!.carbsReq + " " + resourceHelper.gs(R.string.required)
|
//only display carbsreq when carbs havnt been entered recently
|
||||||
|
if (treatmentsPlugin.lastCarbTime < lastRun.lastAPSRun){
|
||||||
|
cobText = cobText + " | " + lastRun.constraintsProcessed!!.carbsReq + " " + resourceHelper.gs(R.string.required)
|
||||||
|
}
|
||||||
|
overview_cob?.text = cobText
|
||||||
if (!carbAnimation.isRunning)
|
if (!carbAnimation.isRunning)
|
||||||
carbAnimation.start()
|
carbAnimation.start()
|
||||||
} else {
|
} else {
|
||||||
overview_cob?.text = cobText
|
overview_cob?.text = cobText
|
||||||
if (carbAnimation.isRunning)
|
|
||||||
carbAnimation.stop()
|
carbAnimation.stop()
|
||||||
carbAnimation.selectDrawable(0);
|
carbAnimation.selectDrawable(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue