Fix warning

kmm_hh
Laurent 5 years ago
parent b51f065b1e
commit 5d5fe4c422
  1. 10
      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) { override fun positionSelected(position: Position) {
val rowRepresentableIndex = this.model.nextActionIndexForPosition(position) val rowRepresentableIndex = this.model.nextActionIndexForPosition(position)
this.model.rowRepresentableForPosition(rowRepresentableIndex)?.let { val row = this.model.rowRepresentableForPosition(rowRepresentableIndex)
onRowSelected(rowRepresentableIndex, it, ComputedAction.Tag.ACTION.ordinal) onRowSelected(rowRepresentableIndex, row, ComputedAction.Tag.ACTION.ordinal)
this.editorAdapter.notifyItemChanged(rowRepresentableIndex) this.editorAdapter.notifyItemChanged(rowRepresentableIndex)
this.scrollToPosition(rowRepresentableIndex) this.scrollToPosition(rowRepresentableIndex)
}
?: throw PAIllegalStateException("RowRepresentable not found at index $rowRepresentableIndex")
} }
// Table // Table

Loading…
Cancel
Save