@ -280,7 +280,9 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL
override fun actionSelected(action: Action.Type) {
Timber.d(">>> action $action selected")
getRealm().executeTransaction {
this.model.actionSelected(action)
}
this.findNextActionToEdit()
@ -179,6 +179,7 @@ class StreetCardsRow(var street: Street, var handHistory: HandHistory) : CardsRo
fun cardsForTag(tag: Int): List<Card>? {
this.cardHolder?.cards?.let { cards ->
return when (tag) {
Street.PREFLOP.ordinal -> listOf()
Street.FLOP.ordinal -> cards.take(3)
Street.TURN.ordinal -> {
if (cards.size > 3) { listOf(cards[4]!!) } else { null }
@ -58,15 +58,18 @@ class PlayerSetupRow(var hero: Boolean = false,
override fun tagForCompletion(handHistory: HandHistory): Int? {
// check cards
// if the PlayerSetup exists
this.playerSetup?.let {
super.tagForCompletion(handHistory)?.let { tag ->
return Tag.CARDS.ordinal
// stack
if (this.playerSetup?.stack == null) {
if (it.stack == null) {
return Tag.STACK.ordinal
return null