Fixes crash when selecting number of players

hh
Laurent 6 years ago
parent 6702ea04f7
commit 95d8e0e229
  1. 2
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/HandHistoryViewModel.kt

@ -205,6 +205,7 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra
private fun readRowRepresentation(): MutableList<RowRepresentable> { private fun readRowRepresentation(): MutableList<RowRepresentable> {
val rows: MutableList<RowRepresentable> = mutableListOf() val rows: MutableList<RowRepresentable> = mutableListOf()
rows.add(HandRowType.COMMENT)
// TODO remove useless settings, collapse multifolds // TODO remove useless settings, collapse multifolds
@ -723,6 +724,7 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra
override fun editDescriptors(row: RowRepresentable): List<RowRepresentableEditDescriptor>? { override fun editDescriptors(row: RowRepresentable): List<RowRepresentableEditDescriptor>? {
return when (row) { return when (row) {
HandRowType.COMMENT -> listOf(RowRepresentableEditDescriptor(this.handHistory.comment, R.string.comment)) HandRowType.COMMENT -> listOf(RowRepresentableEditDescriptor(this.handHistory.comment, R.string.comment))
HandRowType.PLAYER_NUMBER -> listOf(RowRepresentableEditDescriptor(this.handHistory.numberOfPlayers))
HandRowType.ANTE -> listOf(RowRepresentableEditDescriptor(inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL)) HandRowType.ANTE -> listOf(RowRepresentableEditDescriptor(inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL))
else -> null else -> null
} }

Loading…
Cancel
Save