wear settings for predictions
This commit is contained in:
parent
28c2779408
commit
c22c22f1d7
|
@ -465,7 +465,7 @@ public class WatchUpdaterService extends WearableListenerService implements
|
|||
}
|
||||
|
||||
final LoopPlugin.LastRun finalLastRun = LoopPlugin.lastRun;
|
||||
if(finalLastRun != null && finalLastRun.request.hasPredictions && finalLastRun.constraintsProcessed != null){
|
||||
if(SP.getBoolean("wear_predictions", true) && finalLastRun != null && finalLastRun.request.hasPredictions && finalLastRun.constraintsProcessed != null){
|
||||
List<BgReading> predArray = finalLastRun.constraintsProcessed.getPredictions();
|
||||
|
||||
if (!predArray.isEmpty()) {
|
||||
|
|
|
@ -935,5 +935,7 @@
|
|||
<string name="ns_create_announcements_from_errors_title">Create announcements from errors</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="dexcomG5_shortname" translatable="false">G5</string>
|
||||
<string name="wear_predictions_summary">Show the predictions on the watchface.</string>
|
||||
<string name="wear_predictions_title">Predictions</string>
|
||||
</resources>
|
||||
|
||||
|
|
|
@ -36,6 +36,12 @@
|
|||
android:key="wear_notifySMB"
|
||||
android:summary="@string/wear_notifysmb_summary"
|
||||
android:title="@string/wear_notifysmb_title" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="wear_predictions"
|
||||
android:summary="@string/wear_predictions_summary"
|
||||
android:title="@string/wear_predictions_title" />
|
||||
</PreferenceScreen>
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
Loading…
Reference in a new issue