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) {
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

Loading…
Cancel
Save