public async void UpdateText(object sender = null, NightscoutData data = null) { if (data == null) { data = await NightscoutDataService.GetBloodSugar(); // try one more time } if (data == null) { return; } bgText.text = $"{data.sgv} {data.type}{(PluginConfig.Instance.ArrowsEnabled ? data.directionSymbol : "")}"; bgText.color = data.color; }
public void OnApplicationStart() { NightscoutDataService.UpdateBloodSugarTask(); Logger.log.Info("Nightscout counter is up and running!"); }