mirror of
https://github.com/AJMicke/KickerELO.git
synced 2026-03-11 13:31:02 +01:00
Fix bug in update logic for Stat2vs2View
This commit is contained in:
@@ -86,10 +86,10 @@ public class Stat2vs2View extends VerticalLayout {
|
|||||||
private void updateGoalDiffs(Spieler s) {
|
private void updateGoalDiffs(Spieler s) {
|
||||||
String text = "Mittlere Tordifferenz hinten: ";
|
String text = "Mittlere Tordifferenz hinten: ";
|
||||||
Float backDiff = repo.avgGoalDiffBack(s);
|
Float backDiff = repo.avgGoalDiffBack(s);
|
||||||
goalDiffBack.setText(backDiff.isNaN() ? text + "-" : text + String.format("%.2f", backDiff));
|
goalDiffBack.setText(backDiff == null || backDiff.isNaN() ? text + "-" : text + String.format("%.2f", backDiff));
|
||||||
text = "Mittlere Tordifferenz vorne: ";
|
text = "Mittlere Tordifferenz vorne: ";
|
||||||
Float frontDiff = repo.avgGoalDiffFront(s);
|
Float frontDiff = repo.avgGoalDiffFront(s);
|
||||||
goalDiffFront.setText(frontDiff.isNaN() ? text + "-" : text + String.format("%.2f", frontDiff));
|
goalDiffFront.setText(frontDiff == null || frontDiff.isNaN() ? text + "-" : text + String.format("%.2f", frontDiff));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user