diff --git a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HHBuilder.kt b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HHBuilder.kt index eafa9c5f..7d9b895f 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HHBuilder.kt +++ b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HHBuilder.kt @@ -693,7 +693,7 @@ class HHBuilder { private fun createRowRepresentation() { val rows: MutableList = mutableListOf() - rows.add(CustomizableRowRepresentable(customViewType = HandRowType.HEADER, resId = R.string.settings)) + rows.add(CustomizableRowRepresentable(customViewType = HandRowType.HEADER, resId = R.string.settings, value = "")) Street.values().forEach { street -> @@ -789,7 +789,7 @@ class HHBuilder { ?: this.sortedActions.size val potSize = this.sortedActions.take(firstIndexOfStreet).sumByDouble { it.action.effectiveAmount } - val potString = if (potSize > 0) potSize.formatted() else null + val potString = if (potSize > 0) potSize.formatted() else "" // "" required otherwise random values come up val headerView = CustomizableRowRepresentable(customViewType = HandRowType.HEADER, resId = street.resId, value = potString) rowRepresentables.add(headerView) diff --git a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/views/CardsRow.kt b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/views/CardsRow.kt index 9eef38d2..c95a12ed 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/views/CardsRow.kt +++ b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/views/CardsRow.kt @@ -18,12 +18,10 @@ abstract class CardsRow(cards: List) : HandHistoryRow { abstract fun cardLimit() : Int? override fun keyboardForCompletion(): HHKeyboard? { - return if (cards.size < cardLimit() ?: MAX_CARDS) { - HHKeyboard.CARD - } else if (cards.last().suit == null) { - HHKeyboard.CARD - } else { - null + return when { + cards.size < cardLimit() ?: MAX_CARDS -> HHKeyboard.CARD + cards.last().suit == null -> HHKeyboard.CARD + else -> null } }