fix showing dialog
This commit is contained in:
parent
7a98e525e0
commit
1ff5afeaad
1 changed files with 16 additions and 19 deletions
|
@ -416,6 +416,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
||||||
loop.invoke("Accept temp button", false)
|
loop.invoke("Accept temp button", false)
|
||||||
if (lastRun?.lastAPSRun != null && lastRun.constraintsProcessed?.isChangeRequested == true) {
|
if (lastRun?.lastAPSRun != null && lastRun.constraintsProcessed?.isChangeRequested == true) {
|
||||||
protectionCheck.queryProtection(activity, ProtectionCheck.Protection.BOLUS, UIRunnable {
|
protectionCheck.queryProtection(activity, ProtectionCheck.Protection.BOLUS, UIRunnable {
|
||||||
|
if (isAdded)
|
||||||
OKDialog.showConfirmation(activity, rh.gs(R.string.tempbasal_label), lastRun.constraintsProcessed?.toSpanned()
|
OKDialog.showConfirmation(activity, rh.gs(R.string.tempbasal_label), lastRun.constraintsProcessed?.toSpanned()
|
||||||
?: "".toSpanned(), {
|
?: "".toSpanned(), {
|
||||||
uel.log(Action.ACCEPTS_TEMP_BASAL, Sources.Overview)
|
uel.log(Action.ACCEPTS_TEMP_BASAL, Sources.Overview)
|
||||||
|
@ -583,11 +584,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
||||||
it.text = event.title
|
it.text = event.title
|
||||||
|
|
||||||
it.setOnClickListener {
|
it.setOnClickListener {
|
||||||
OKDialog.showConfirmation(
|
OKDialog.showConfirmation(context, rh.gs(R.string.run_question, event.title), { handler.post { automationPlugin.processEvent(event) } })
|
||||||
context,
|
|
||||||
rh.gs(R.string.run_question, event.title),
|
|
||||||
{ handler.post { automationPlugin.processEvent(event) } }
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
binding.buttonsLayout.userButtonsLayout.addView(it)
|
binding.buttonsLayout.userButtonsLayout.addView(it)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue