Merge pull request #210 from nightscout/fix/concurrent-button-press-crash

Fix/concurrent button press crash
This commit is contained in:
Milos Kozak 2021-01-10 19:52:04 +01:00 committed by GitHub
commit a843bb8b84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,7 +192,7 @@ public class TimeListEdit {
int before, int count) {
}
});
numberPickers1[position].setTag(tagPrefix +"-1-" + position);
numberPickers1[position].setTag(tagPrefix + "-1-" + position);
numberPickers2[position].setTextWatcher(new TextWatcher() {
@Override
@ -212,7 +212,7 @@ public class TimeListEdit {
int before, int count) {
}
});
numberPickers2[position].setTag(tagPrefix +"-2-" + position);
numberPickers2[position].setTag(tagPrefix + "-2-" + position);
layout.addView(childView);
}
@ -245,7 +245,7 @@ public class TimeListEdit {
if (i == 0) next = ONEHOURINSECONDS;
fillSpinner(timeSpinner, secondFromMidnight(i), previous, next);
editText1.setParams(value1(i), min, max, step, formatter, false,null);
editText1.setParams(value1(i), min, max, step, formatter, false, null);
editText2.setParams(value2(i), min, max, step, formatter, false, null);
if (data2 == null) {
@ -372,6 +372,7 @@ public class TimeListEdit {
}
private void addItem(int index, int timeAsSeconds, double value1, double value2) {
if (itemsCount() >= 24) return;
if (itemsCount() > inflatedUntil) {
layout.removeView(finalAdd);
inflateRow(++inflatedUntil);