Fixes straddle header having a value

hh
Laurent 6 years ago
parent 271600f357
commit 82ce3c76b3
  1. 2
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryAdapter.kt
  2. 2
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/HandHistoryViewModel.kt

@ -37,7 +37,7 @@ import net.pokeranalytics.android.ui.view.rowrepresentable.ViewIdentifier
enum class HandRowType(var layoutRes: Int) : ViewIdentifier, RowRepresentable, HandHistoryRow { enum class HandRowType(var layoutRes: Int) : ViewIdentifier, RowRepresentable, HandHistoryRow {
DEFAULT(R.layout.row_title_value), DEFAULT(R.layout.row_title),
HEADER(R.layout.row_header_value), HEADER(R.layout.row_header_value),
ACTION(R.layout.row_hand_action), ACTION(R.layout.row_hand_action),
PLAYER_SUMMARY(R.layout.row_hand_player_summary), PLAYER_SUMMARY(R.layout.row_hand_player_summary),

@ -179,7 +179,7 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra
val positions = Position.positionsPerPlayers(this.handHistory.numberOfPlayers) val positions = Position.positionsPerPlayers(this.handHistory.numberOfPlayers)
if (this.isNew && positions.size > 2) { // don't allow any straddle changes if not new, or if it's a headsup if (this.isNew && positions.size > 2) { // don't allow any straddle changes if not new, or if it's a headsup
rows.add(CustomizableRowRepresentable(customViewType = HandRowType.HEADER, resId = R.string.straddle)) rows.add(CustomizableRowRepresentable(customViewType = HandRowType.HEADER, resId = R.string.straddle, value = ""))
positions.remove(Position.SB) positions.remove(Position.SB)
positions.remove(Position.BB) positions.remove(Position.BB)
rows.add(StraddleRowRepresentable(positions, this.straddlePositions)) rows.add(StraddleRowRepresentable(positions, this.straddlePositions))

Loading…
Cancel
Save