Merge remote-tracking branch 'origin/dev' into layout

This commit is contained in:
Milos Kozak 2020-05-03 00:32:30 +02:00
commit 818e7cd6b6
2 changed files with 3 additions and 5 deletions

View file

@ -79,7 +79,7 @@ class RandomBgPlugin @Inject constructor(
val cal = GregorianCalendar()
val currentMinute = cal.get(Calendar.MINUTE) + (cal.get(Calendar.HOUR_OF_DAY) % 2) * 60
val bgMgdl = min + (max - min) + (max - min) * sin(currentMinute / 120.0 * 2 * PI)
val bgMgdl = min + ((max - min) + (max - min) * sin(currentMinute / 120.0 * 2 * PI))/2
val bgReading = BgReading()
bgReading.value = bgMgdl

View file

@ -2,7 +2,6 @@ package info.nightscout.androidaps.utils.textValidator
import android.content.Context
import android.util.AttributeSet
import androidx.core.content.res.TypedArrayUtils
import androidx.preference.EditTextPreference
import androidx.preference.EditTextPreference.OnBindEditTextListener
import androidx.preference.PreferenceViewHolder
@ -23,8 +22,7 @@ class ValidatingEditTextPreference(ctx: Context, attrs: AttributeSet, defStyleAt
: this(ctx, attrs, defStyle, 0)
constructor(ctx: Context, attrs: AttributeSet)
: this(ctx, attrs, TypedArrayUtils.getAttr(ctx, R.attr.editTextPreferenceStyle,
R.attr.editTextPreferenceStyle))
: this(ctx, attrs, R.attr.editTextPreferenceStyle)
private lateinit var editTextValidator: EditTextValidator