BG autobackfill configurable

This commit is contained in:
Milos Kozak 2018-03-14 20:21:48 +01:00
parent eb017e7793
commit e9313c5b28
4 changed files with 10 additions and 2 deletions

View file

@ -124,8 +124,8 @@ public class DataService extends IntentService {
handleNewDataFromDexcomG5(intent);
}
} else if (Intents.ACTION_NEW_SGV.equals(action)) {
// always backfill SGV from NS
handleNewDataFromNSClient(intent);
if (nsClientEnabled || SP.getBoolean(R.string.ns_autobackfill, true))
handleNewDataFromNSClient(intent);
// Objectives 0
ObjectivesPlugin.bgIsAvailableInNS = true;
ObjectivesPlugin.saveProgress();

View file

@ -872,4 +872,5 @@
<string name="subcategory">Podkategorie</string>
<string name="category">Kategorie</string>
<string name="bolusrecordedonly">Bolus bude pouze zaznamenán</string>
<string name="ns_autobackfill">Automaticky doplňovat chybějící glykémie z NS</string>
</resources>

View file

@ -979,5 +979,7 @@
<string name="category">Category</string>
<string name="subcategory">Subcategory</string>
<string name="bolusrecordedonly">Bolus will be recorded only</string>
<string name="ns_autobackfill">Autobackfill missig BGs from NS</string>
<string name="key_ns_autobackfill" translatable="false">ns_autobackfill</string>
</resources>

View file

@ -22,6 +22,11 @@
android:key="@string/key_nsclientinternal_api_secret"
android:title="@string/nsclientinternal_secret_title" />
<SwitchPreference
android:defaultValue="true"
android:key="@string/key_ns_autobackfill"
android:title="@string/ns_autobackfill" />
<SwitchPreference
android:defaultValue="true"
android:key="@string/key_ns_logappstartedevent"