Fixes bug + improvement with position shortcut

hh
Laurent 6 years ago
parent 2c960078fa
commit efda21b684
  1. 3
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryFragment.kt
  2. 3
      app/src/main/res/layout/row_bottom_sheet_grid_title.xml

@ -518,8 +518,9 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL
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 { this.model.rowRepresentableForPosition(rowRepresentableIndex)?.let {
onRowSelected(rowRepresentableIndex, it, HHKeyboard.ACTION.ordinal) onRowSelected(rowRepresentableIndex, it, ComputedAction.Tag.ACTION.ordinal)
this.handHistoryAdapter.notifyItemChanged(rowRepresentableIndex) this.handHistoryAdapter.notifyItemChanged(rowRepresentableIndex)
this.scrollToPosition(rowRepresentableIndex)
} ?: throw PAIllegalStateException("Rowrepresentable not fouind at index $rowRepresentableIndex") } ?: throw PAIllegalStateException("Rowrepresentable not fouind at index $rowRepresentableIndex")
} }

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container" android:id="@+id/container"

Loading…
Cancel
Save