From be9bcc8ceb4c512370e0bb2843ef28f60ca96f8b Mon Sep 17 00:00:00 2001 From: Laurent Date: Wed, 18 Mar 2020 15:23:33 +0100 Subject: [PATCH] Fixes BB ante in read mode --- .../android/ui/modules/handhistory/HandHistoryAdapter.kt | 7 +++++-- .../ui/modules/handhistory/model/HandHistoryViewModel.kt | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryAdapter.kt b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryAdapter.kt index 4d17ed6d..76626312 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryAdapter.kt +++ b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryAdapter.kt @@ -54,6 +54,7 @@ enum class HandRowType(var layoutRes: Int) : ViewIdentifier, RowRepresentable { PLAYER_SETUP_READ(R.layout.row_hhsettings_player_setup_read), ANTE(R.layout.row_title_value), BIG_BLIND_ANTE(R.layout.row_title_switch), + BIG_BLIND_ANTE_READ(R.layout.row_title_value), ACTION_READ(R.layout.row_hand_action_read), HERO_POSITION(R.layout.row_recycler), PLAYER_POSITION(R.layout.row_recycler) @@ -80,7 +81,7 @@ enum class HandRowType(var layoutRes: Int) : ViewIdentifier, RowRepresentable { PLAYER_NUMBER -> R.string.number_of_players COMMENT -> R.string.comment ANTE -> R.string.ante - BIG_BLIND_ANTE -> R.string.bb_ante_option + BIG_BLIND_ANTE, BIG_BLIND_ANTE_READ -> R.string.bb_ante_option else -> null } } @@ -123,7 +124,9 @@ class HandHistoryAdapter( HandRowType.COMMENT -> RowViewHolder(layout) HandRowType.ACTION_READ -> RowActionReadHolder(layout) HandRowType.HERO_POSITION, HandRowType.PLAYER_POSITION -> RowPositionHolder(layout) - HandRowType.PLAYER_NUMBER, HandRowType.ANTE, HandRowType.BIG_BLIND_ANTE -> RowViewHolder(layout) + HandRowType.PLAYER_NUMBER, + HandRowType.ANTE, + HandRowType.BIG_BLIND_ANTE, HandRowType.BIG_BLIND_ANTE_READ -> RowViewHolder(layout) } } 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 522fdec8..91d457f4 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 @@ -223,7 +223,7 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra } if (this.handHistory.bigBlindAnte) { - rows.add(HandRowType.BIG_BLIND_ANTE) + rows.add(HandRowType.BIG_BLIND_ANTE_READ) } rows.add(CustomizableRowRepresentable(customViewType = HandRowType.HEADER, resId = R.string.players, value = "")) @@ -719,6 +719,7 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra HandRowType.PLAYER_NUMBER -> this.handHistory.numberOfPlayers.toString() HandRowType.COMMENT -> this.handHistory.comment ?: context.getString(R.string.comment) HandRowType.ANTE -> this.handHistory.ante.formatted() + HandRowType.BIG_BLIND_ANTE_READ -> context.getString(R.string.yes) // HandRowType.HERO_POSITION -> context.getString(R.string.set_hero_position) // HandRowType.PLAYER_POSITION -> context.getString(R.string.set_position_details) is ComputedAction -> row.action.formattedAmount