avoid concurrent button press crash in TimeListEdit - now for real
This commit is contained in:
parent
4c25272969
commit
b509d13073
|
@ -372,12 +372,11 @@ public class TimeListEdit {
|
|||
}
|
||||
|
||||
private void addItem(int index, int timeAsSeconds, double value1, double value2) {
|
||||
synchronized (this) {
|
||||
if (itemsCount() > inflatedUntil) {
|
||||
layout.removeView(finalAdd);
|
||||
inflateRow(++inflatedUntil);
|
||||
layout.addView(finalAdd);
|
||||
}
|
||||
if (itemsCount() >= 24) return;
|
||||
if (itemsCount() > inflatedUntil) {
|
||||
layout.removeView(finalAdd);
|
||||
inflateRow(++inflatedUntil);
|
||||
layout.addView(finalAdd);
|
||||
}
|
||||
try {
|
||||
// shift data
|
||||
|
|
Loading…
Reference in a new issue