From 95d8e0e229c92313dc77a751d8d12ef2f52b3304 Mon Sep 17 00:00:00 2001 From: Laurent Date: Tue, 25 Feb 2020 18:26:47 +0100 Subject: [PATCH] Fixes crash when selecting number of players --- .../ui/modules/handhistory/model/HandHistoryViewModel.kt | 2 ++ 1 file changed, 2 insertions(+) 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 8dac8d56..d90373b0 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 @@ -205,6 +205,7 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra private fun readRowRepresentation(): MutableList { val rows: MutableList = mutableListOf() + rows.add(HandRowType.COMMENT) // TODO remove useless settings, collapse multifolds @@ -723,6 +724,7 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra override fun editDescriptors(row: RowRepresentable): List? { return when (row) { 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)) else -> null }