better code

hh
Laurent 6 years ago
parent 2bf6972bea
commit c4022d9b15
  1. 6
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/ActionList.kt

@ -643,11 +643,11 @@ class ActionList(var listener: ActionListListener) : ArrayList<ComputedAction>()
remainingStack?.let { rs -> remainingStack?.let { rs ->
if (ca.action.type?.isAllin == false) { if (ca.action.type?.isAllin == true) { // updates the action amount
ca.setType(ca.action.type!!)
} else { // updates the remaining stack
remainingStack = rs - ca.action.effectiveAmount remainingStack = rs - ca.action.effectiveAmount
ca.playerRemainingStack = remainingStack ca.playerRemainingStack = remainingStack
} else {
ca.setType(ca.action.type!!) // updates the action amount
} }
} ?: run { } ?: run {

Loading…
Cancel
Save