|
|
|
@ -832,6 +832,7 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra |
|
|
|
override fun boolForRow(row: RowRepresentable): Boolean { |
|
|
|
override fun boolForRow(row: RowRepresentable): Boolean { |
|
|
|
return when (row) { |
|
|
|
return when (row) { |
|
|
|
HandRowType.BIG_BLIND_ANTE -> this.handHistory.bigBlindAnte |
|
|
|
HandRowType.BIG_BLIND_ANTE -> this.handHistory.bigBlindAnte |
|
|
|
|
|
|
|
is PositionalRow -> row.positionIndex == this.handHistory.heroIndex |
|
|
|
else -> throw PAIllegalStateException("undefined boolForRow for $row") |
|
|
|
else -> throw PAIllegalStateException("undefined boolForRow for $row") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -897,7 +898,7 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra |
|
|
|
val hh = this.handHistory |
|
|
|
val hh = this.handHistory |
|
|
|
return hh.playerSetups.sortedBy { it.position }.map { |
|
|
|
return hh.playerSetups.sortedBy { it.position }.map { |
|
|
|
val position = this.positionForIndex(it.position) |
|
|
|
val position = this.positionForIndex(it.position) |
|
|
|
createPlayerSetupRow(position, it.position, hero = false, readMode = true) |
|
|
|
createPlayerSetupRow(position, it.position, readMode = true) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -914,8 +915,7 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra |
|
|
|
|
|
|
|
|
|
|
|
val existingSetups = hh.playerSetups.sortedBy { it.position }.map { |
|
|
|
val existingSetups = hh.playerSetups.sortedBy { it.position }.map { |
|
|
|
val position = this.positionForIndex(it.position) |
|
|
|
val position = this.positionForIndex(it.position) |
|
|
|
val hero = (it.position == hh.heroIndex) |
|
|
|
createPlayerSetupRow(position, it.position) |
|
|
|
createPlayerSetupRow(position, it.position, hero) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
arrangedSetups.addAll(existingSetups) |
|
|
|
arrangedSetups.addAll(existingSetups) |
|
|
|
@ -929,10 +929,9 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra |
|
|
|
private fun createPlayerSetupRow( |
|
|
|
private fun createPlayerSetupRow( |
|
|
|
position: Position, |
|
|
|
position: Position, |
|
|
|
positionIndex: Int, |
|
|
|
positionIndex: Int, |
|
|
|
hero: Boolean, |
|
|
|
|
|
|
|
readMode: Boolean = false |
|
|
|
readMode: Boolean = false |
|
|
|
): PlayerSetupRow { |
|
|
|
): PlayerSetupRow { |
|
|
|
return PlayerSetupRow(hero, readMode, position, positionIndex, this.handHistory, this.playerHandMaxCards) |
|
|
|
return PlayerSetupRow(readMode, position, positionIndex, this.handHistory, this.playerHandMaxCards) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
/*** |
|
|
|
|