Bolus command: ensure the progress dialog is always closed.

This commit is contained in:
Johannes Mockenhaupt 2017-10-25 15:03:29 +02:00
parent 454cb49ec5
commit 34861960ea
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
2 changed files with 5 additions and 0 deletions

View file

@ -406,6 +406,9 @@ public class ComboPlugin implements PluginBase, PumpInterface {
case STOPPED:
event.status = MainApp.sResources.getString(R.string.bolusstopped);
break;
default:
// no state, just percent below
break;
}
event.percent = percent;
MainApp.bus().post(event);

View file

@ -208,6 +208,8 @@ public class BolusCommand extends BaseCommand {
.history(new PumpHistory().bolusHistory(boluses));
} catch (CommandException e) {
return e.toCommandResult();
} finally {
bolusProgressReporter.report(null, 100, 0);
}
}