Provide message when setting basal profile fails. Fixes #29.

This commit is contained in:
Johannes Mockenhaupt 2017-12-27 01:23:16 +01:00
parent 715ffa28d2
commit c84ba24c77
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -263,7 +263,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
if (!setResult.success) {
Notification notification = new Notification(Notification.FAILED_UDPATE_PROFILE, MainApp.sResources.getString(R.string.failedupdatebasalprofile), Notification.URGENT);
MainApp.bus().post(new EventNewNotification(notification));
return new PumpEnactResult().success(false).enacted(false);
return new PumpEnactResult().success(false).enacted(false).comment(MainApp.sResources.getString(R.string.failedupdatebasalprofile));
}
/* don't re-read basal profile to not trigger pump bug; setBasalProfile command checks the total at the end, which must suffice