Fixes pot size issue

hh
Laurent 6 years ago
parent 5924a8876a
commit 6fd6eb43e5
  1. 8
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HHBuilder.kt
  2. 2
      app/src/main/res/values/styles.xml

@ -480,13 +480,13 @@ class HHBuilder {
* Returns the committed amount by the player for the street at the current [index] * Returns the committed amount by the player for the street at the current [index]
*/ */
private fun getPreviouslyCommittedAmount(index: Int): Double? { private fun getPreviouslyCommittedAmount(index: Int): Double? {
val action = this.actionForIndex(index).action val computedAction = this.actionForIndex(index)
val position = action.position val position = computedAction.position
val street = action.street val street = computedAction.action.street
val previousActions = this.sortedActions.take(index) val previousActions = this.sortedActions.take(index)
val previousComputedAction = previousActions.lastOrNull { val previousComputedAction = previousActions.lastOrNull {
it.action.position == position && it.street == street it.position == position && it.street == street
} }
previousComputedAction?.action?.let { previousAction -> previousComputedAction?.action?.let { previousAction ->

@ -351,7 +351,7 @@
<item name="android:paddingStart">4dp</item> <item name="android:paddingStart">4dp</item>
<item name="android:paddingEnd">8dp</item> <item name="android:paddingEnd">8dp</item>
<item name="android:textSize">12sp</item> <item name="android:textSize">12sp</item>
<item name="backgroundTint">@color/kaki_medium</item> <item name="backgroundTint">@color/kaki</item>
</style> </style>
<style name="PokerAnalyticsTheme.CardButton" parent="Widget.MaterialComponents.Button"> <style name="PokerAnalyticsTheme.CardButton" parent="Widget.MaterialComponents.Button">

Loading…
Cancel
Save