merge n fix

This commit is contained in:
Tim Gunn 2020-05-13 10:14:02 +12:00
parent fa74cf4804
commit 15df6f3349
No known key found for this signature in database
GPG key ID: C9BC1E9D0D0AED8C
11 changed files with 17 additions and 13 deletions

View file

@ -446,26 +446,26 @@ public class LoopPlugin extends PluginBase implements LoopInterface {
rxBus.send(new EventNewNotification(carbreqlocal));
}
if (sp.getBoolean(R.string.key_ns_create_announcements_from_carbs_req, false)) {
NSUpload.uploadError(resultAfterConstraints.getCarbsRequiredText());
nsUpload.uploadError(resultAfterConstraints.getCarbsRequiredText());
}
if (sp.getBoolean(R.string.key_raise_notifications_as_android_notifications, false)){
Intent intentAction5m = new Intent(context, CarbSuggestionReceiver.class);
intentAction5m.putExtra("ignoreDuration", 5);
PendingIntent pendingIntent5m = PendingIntent.getBroadcast(context, 1, intentAction5m, PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Action actionIgnore5m = new
NotificationCompat.Action(R.drawable.ic_notif_aaps, sp.getString(R.string.ignore5m,"Ignore 5m"), pendingIntent5m);
NotificationCompat.Action(R.drawable.ic_notif_aaps, resourceHelper.gs(R.string.ignore5m,"Ignore 5m"), pendingIntent5m);
Intent intentAction15m = new Intent(context, CarbSuggestionReceiver.class);
intentAction15m.putExtra("ignoreDuration", 15);
PendingIntent pendingIntent15m = PendingIntent.getBroadcast(context, 1, intentAction15m, PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Action actionIgnore15m = new
NotificationCompat.Action(R.drawable.ic_notif_aaps, sp.getString(R.string.ignore15m,"Ignore 15m"), pendingIntent15m);
NotificationCompat.Action(R.drawable.ic_notif_aaps, resourceHelper.gs(R.string.ignore15m,"Ignore 15m"), pendingIntent15m);
Intent intentAction30m = new Intent(context, CarbSuggestionReceiver.class);
intentAction30m.putExtra("ignoreDuration", 30);
PendingIntent pendingIntent30m = PendingIntent.getBroadcast(context, 1, intentAction30m, PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Action actionIgnore30m = new
NotificationCompat.Action(R.drawable.ic_notif_aaps, sp.getString(R.string.ignore30m,"Ignore 30m"), pendingIntent30m);
NotificationCompat.Action(R.drawable.ic_notif_aaps, resourceHelper.gs(R.string.ignore30m,"Ignore 30m"), pendingIntent30m);
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID);
builder.setSmallIcon(R.drawable.notif_icon)

View file

@ -748,15 +748,17 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
}
val lastRun = loopPlugin.lastRun
if (config.APS && lastRun?.constraintsProcessed != null && lastRun?.constraintsProcessed.carbsReq > 0) {
overview_cob?.text = cobText + " *" + lastRun?.constraintsProcessed.carbsReq + " "+R.string.required+"*"
if (!carbAnimation.isRunning)
carbAnimation.start()
} else {
overview_cob?.text = cobText
if (carbAnimation.isRunning)
carbAnimation.stop()
carbAnimation.selectDrawable(0);
if (config.APS && lastRun?.constraintsProcessed != null) {
if (lastRun.constraintsProcessed!!.carbsReq > 0) {
overview_cob?.text = cobText + " | " + lastRun.constraintsProcessed!!.carbsReq + " " + resourceHelper.gs(R.string.required)
if (!carbAnimation.isRunning)
carbAnimation.start()
} else {
overview_cob?.text = cobText
if (carbAnimation.isRunning)
carbAnimation.stop()
carbAnimation.selectDrawable(0);
}
}
val predictionsAvailable = if (config.APS) lastRun?.request?.hasPredictions == true else config.NSCLIENT

View file

@ -0,0 +1 @@
# danars-support-lib

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -789,6 +789,7 @@
<string name="ns_create_announcements_from_carbs_req_title">Create announcements from carbs required alerts</string>
<string name="ns_create_announcements_from_errors_summary">Create Nightscout announcement for error dialogs and local alerts (also viewable in Careportal under Treatments)</string>
<string name="ns_create_announcements_from_carbs_req_summary">Create Nightscout announcements for carbs required alerts</string>
<string name="key_ns_create_announcements_from_carbs_req" translatable="false">ns_create_announcements_from_carbs_req</string>
<string name="eversense_shortname" translatable="false">EVR</string>
<string name="wear_predictions_summary">Show the predictions on the watchface.</string>
<string name="wear_predictions_title">Predictions</string>