Fixes a bug that increased all button count by 1 (#1911)

This will fix an issue when the next button was not displayed when it was necessary.
This commit is contained in:
BONNe 2022-01-08 04:48:25 +02:00 committed by GitHub
parent ff4a7c9d61
commit eaf2236f7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,7 @@ public class TemplatedPanel extends Panel
{
String type = String.valueOf(record.dataMap().get("type"));
int counter = this.typeSlotMap.computeIfAbsent(type, key -> 1);
int counter = this.typeSlotMap.computeIfAbsent(type, key -> 0);
this.typeSlotMap.put(type, counter + 1);
}
}
@ -227,7 +227,7 @@ public class TemplatedPanel extends Panel
{
String type = String.valueOf(record.dataMap().get("type"));
int counter = this.typeSlotMap.computeIfAbsent(type, key -> 1);
int counter = this.typeSlotMap.computeIfAbsent(type, key -> 0);
this.typeSlotMap.put(type, counter + 1);
}
}
@ -290,7 +290,7 @@ public class TemplatedPanel extends Panel
{
String type = String.valueOf(record.dataMap().get("type"));
int counter = this.typeSlotMap.computeIfAbsent(type, key -> 1);
int counter = this.typeSlotMap.computeIfAbsent(type, key -> 0);
this.typeSlotMap.put(type, counter + 1);
}
}