From 8cace5259ac5e253a6346b335e8b1f1c379b4370 Mon Sep 17 00:00:00 2001 From: Laurent Date: Mon, 23 Mar 2020 11:50:43 +0100 Subject: [PATCH] Fixes issues where allining a player was displaying the summary --- app/build.gradle | 2 +- .../ui/modules/handhistory/model/HandHistoryViewModel.kt | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0430b436..b86b27c7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -34,7 +34,7 @@ android { minSdkVersion 23 targetSdkVersion 28 versionCode 78 - versionName "2.3.6" + versionName "2.3.7" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/HandHistoryViewModel.kt b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/HandHistoryViewModel.kt index 827f731b..6bbbc8ef 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/HandHistoryViewModel.kt +++ b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/HandHistoryViewModel.kt @@ -323,7 +323,8 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra Street.SUMMARY -> { 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) val activePositions = this.sortedActions.activePositions(lastActionIndex, true) @@ -380,7 +381,7 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra */ fun setNumberOfPlayers(playerCount: Int) { if (playerCount != this.handHistory.numberOfPlayers) { - this.handHistory.numberOfPlayers = playerCount + this.handSetup.tableSize = playerCount this.handHistory.configure(this.handSetup) load() }