Fixes issues where allining a player was displaying the summary

hh
Laurent 6 years ago
parent 208ed54084
commit 8cace5259a
  1. 2
      app/build.gradle
  2. 5
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/HandHistoryViewModel.kt

@ -34,7 +34,7 @@ android {
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 28 targetSdkVersion 28
versionCode 78 versionCode 78
versionName "2.3.6" versionName "2.3.7"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }

@ -323,7 +323,8 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra
Street.SUMMARY -> { Street.SUMMARY -> {
val lastActionIndex = this.sortedActions.size - 1 val lastActionIndex = this.sortedActions.size - 1
if (this.sortedActions.activePositions(lastActionIndex).size < 2 || this.sortedActions.isStreetActionClosed(lastActionIndex) == Street.SUMMARY) { if (this.sortedActions.isStreetActionClosed(lastActionIndex) == Street.SUMMARY) {
// if (this.sortedActions.activePositions(lastActionIndex).size < 2 || this.sortedActions.isStreetActionClosed(lastActionIndex) == Street.SUMMARY) {
addStreetHeader(rows, street) addStreetHeader(rows, street)
val activePositions = this.sortedActions.activePositions(lastActionIndex, true) val activePositions = this.sortedActions.activePositions(lastActionIndex, true)
@ -380,7 +381,7 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra
*/ */
fun setNumberOfPlayers(playerCount: Int) { fun setNumberOfPlayers(playerCount: Int) {
if (playerCount != this.handHistory.numberOfPlayers) { if (playerCount != this.handHistory.numberOfPlayers) {
this.handHistory.numberOfPlayers = playerCount this.handSetup.tableSize = playerCount
this.handHistory.configure(this.handSetup) this.handHistory.configure(this.handSetup)
load() load()
} }

Loading…
Cancel
Save