Merge pull request #905 from jotomo/no-future-for-you

Don't send future carbs to pumps.
This commit is contained in:
Milos Kozak 2018-04-21 18:13:33 +02:00 committed by GitHub
commit 209623f9ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -431,7 +431,7 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, C
carbInfo.context = getContext();
carbInfo.source = Source.USER;
carbInfo.notes = notes;
if (ConfigBuilderPlugin.getActivePump().getPumpDescription().storesCarbInfo) {
if (ConfigBuilderPlugin.getActivePump().getPumpDescription().storesCarbInfo && carbInfo.date <= now()) {
ConfigBuilderPlugin.getCommandQueue().bolus(carbInfo, new Callback() {
@Override
public void run() {