From 5d5fe4c422251ede7695a56361eb5de12126e7d9 Mon Sep 17 00:00:00 2001 From: Laurent Date: Mon, 4 Jan 2021 15:03:03 +0100 Subject: [PATCH] Fix warning --- .../ui/modules/handhistory/editor/EditorFragment.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/editor/EditorFragment.kt b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/editor/EditorFragment.kt index 8f6a16ff..c51ab369 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/editor/EditorFragment.kt +++ b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/editor/EditorFragment.kt @@ -575,12 +575,10 @@ class EditorFragment : RealmFragment(), RowRepresentableDelegate, KeyboardListen */ override fun positionSelected(position: Position) { val rowRepresentableIndex = this.model.nextActionIndexForPosition(position) - this.model.rowRepresentableForPosition(rowRepresentableIndex)?.let { - onRowSelected(rowRepresentableIndex, it, ComputedAction.Tag.ACTION.ordinal) - this.editorAdapter.notifyItemChanged(rowRepresentableIndex) - this.scrollToPosition(rowRepresentableIndex) - } - ?: throw PAIllegalStateException("RowRepresentable not found at index $rowRepresentableIndex") + val row = this.model.rowRepresentableForPosition(rowRepresentableIndex) + onRowSelected(rowRepresentableIndex, row, ComputedAction.Tag.ACTION.ordinal) + this.editorAdapter.notifyItemChanged(rowRepresentableIndex) + this.scrollToPosition(rowRepresentableIndex) } // Table