|
|
|
|
@ -840,7 +840,9 @@ class HHBuilder { |
|
|
|
|
*/ |
|
|
|
|
private fun addStreetHeader(rowRepresentables: MutableList<RowRepresentable>, street: Street) { |
|
|
|
|
|
|
|
|
|
val potSize = this.sortedActions.sumByDouble { it.action.effectiveAmount } |
|
|
|
|
val firstIndexOfStreet = this.sortedActions.firstOrNull { it.action.street == street }?.action?.index ?: this.sortedActions.size |
|
|
|
|
|
|
|
|
|
val potSize = this.sortedActions.take(firstIndexOfStreet).sumByDouble { it.action.effectiveAmount } |
|
|
|
|
val potString = if (potSize > 0) potSize.formatted() else null |
|
|
|
|
|
|
|
|
|
val headerView = CustomizableRowRepresentable(customViewType = HandRowType.HEADER, resId = street.resId, value = potString) |
|
|
|
|
|