diff --git a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HHBuilder.kt b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HHBuilder.kt index 1cfa7dc9..d073e6c8 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HHBuilder.kt +++ b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HHBuilder.kt @@ -840,7 +840,9 @@ class HHBuilder { */ private fun addStreetHeader(rowRepresentables: MutableList, 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)