diff --git a/app/src/main/java/net/pokeranalytics/android/model/realm/handhistory/HandHistory.kt b/app/src/main/java/net/pokeranalytics/android/model/realm/handhistory/HandHistory.kt index aa2eff37..dc3d3d33 100644 --- a/app/src/main/java/net/pokeranalytics/android/model/realm/handhistory/HandHistory.kt +++ b/app/src/main/java/net/pokeranalytics/android/model/realm/handhistory/HandHistory.kt @@ -421,18 +421,6 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Filterable, } } -// private fun definesIfHeroWins() { -// this.heroIndex?.let { heroIndex -> -// -// val heroCards = this.playerSetupForPosition(heroIndex)?.cards -// val heroNumberOfCards = heroCards?.size ?: 0 -// if (this.board.size == 5 && heroNumberOfCards > 1) { -// -// } -// -// } -// } - /*** * Creates a list of cards for the hand history to give a representation of the hand * We will try to add a minimum of 5 cards using by priority: @@ -462,7 +450,7 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Filterable, cardSets.add(this.board) // Try to add cards but not too much - while (views.size < 6 && cardSets.isNotEmpty()) { + while (views.size < 5 && cardSets.isNotEmpty()) { val cardSet = cardSets.removeAt(0) @@ -485,7 +473,7 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Filterable, return views } - fun compareHands(activePositions: List): List { + private fun compareHands(activePositions: List): List { // Evaluate all hands val results = activePositions.map { 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 34811909..90091d62 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 @@ -819,7 +819,7 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra return if (this.isEdited) { if (position < this.settingsRowCount) R.color.green_header else R.color.transparent } else { - null + R.color.transparent } } diff --git a/app/src/test/java/net/pokeranalytics/android/BasicUnitTest.kt b/app/src/test/java/net/pokeranalytics/android/BasicUnitTest.kt index 0e2b6a04..fcac5be9 100644 --- a/app/src/test/java/net/pokeranalytics/android/BasicUnitTest.kt +++ b/app/src/test/java/net/pokeranalytics/android/BasicUnitTest.kt @@ -15,9 +15,11 @@ class BasicUnitTest : RealmUnitTest() { @Test fun testStandardFormatting() { - val n = 2222.0 - val f = n.formatted - Assert.assertEquals("2 222", f) + + val s = "2222" + val p = s.toDouble() + + Assert.assertEquals(2222.0, p, 0.001) } @Test