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 c8db6f7c..d4d5c85b 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 @@ -477,7 +477,8 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Filterable, val heroWins: Boolean? get() { return this.heroIndex?.let { heroIndex -> - this.winnerPots.any { it.position == heroIndex } + heroIndex == this.largestWonPot?.position +// this.winnerPots.any { it.position == heroIndex } } ?: run { null } @@ -733,7 +734,7 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Filterable, return boardHasWildCard || playerCardHasWildCard } - val allFullCards: List + private val allFullCards: List get() { val cards = mutableListOf() cards.addAll(this.board) @@ -753,4 +754,9 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Filterable, return cards.filter { it.isSuitWildCard } } + val largestWonPot: WonPot? + get() { + return this.winnerPots.maxBy { it.amount } + } + } \ No newline at end of file