From 34c6329b6fc35df3eb88062b5073a54eb7875b2d Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 6 Oct 2016 20:57:12 +0200 Subject: [PATCH] fix context in newextendedbolusdialog --- .idea/misc.xml | 2 +- .../plugins/Overview/Dialogs/NewExtendedBolusDialog.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index fbb68289f4..5d19981032 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -37,7 +37,7 @@ - + diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewExtendedBolusDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewExtendedBolusDialog.java index 41afa4c357..e3be3b7225 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewExtendedBolusDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewExtendedBolusDialog.java @@ -92,7 +92,7 @@ public class NewExtendedBolusDialog extends DialogFragment implements View.OnCli final Context context = getContext(); AlertDialog.Builder builder = new AlertDialog.Builder(context); - builder.setTitle(this.getContext().getString(R.string.confirmation)); + builder.setTitle(context.getString(R.string.confirmation)); builder.setMessage(confirmMessage); builder.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { @@ -103,9 +103,9 @@ public class NewExtendedBolusDialog extends DialogFragment implements View.OnCli PumpEnactResult result = pump.setExtendedBolus(finalInsulin, finalDurationInMinutes); if (!result.success) { AlertDialog.Builder builder = new AlertDialog.Builder(context); - builder.setTitle(getContext().getString(R.string.treatmentdeliveryerror)); + builder.setTitle(context.getString(R.string.treatmentdeliveryerror)); builder.setMessage(result.comment); - builder.setPositiveButton(getContext().getString(R.string.ok), null); + builder.setPositiveButton(context.getString(R.string.ok), null); builder.show(); } }