|
|
|
@ -564,7 +564,7 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL |
|
|
|
this.handHistoryAdapter.notifyItemChanged(rowRepresentableIndex) |
|
|
|
this.handHistoryAdapter.notifyItemChanged(rowRepresentableIndex) |
|
|
|
this.scrollToPosition(rowRepresentableIndex) |
|
|
|
this.scrollToPosition(rowRepresentableIndex) |
|
|
|
} |
|
|
|
} |
|
|
|
?: throw PAIllegalStateException("Rowrepresentable not fouind at index $rowRepresentableIndex") |
|
|
|
?: throw PAIllegalStateException("RowRepresentable not found at index $rowRepresentableIndex") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Table |
|
|
|
// Table |
|
|
|
@ -589,16 +589,10 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL |
|
|
|
* Refreshes the selected row |
|
|
|
* Refreshes the selected row |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private fun refreshSelectedRow() { |
|
|
|
private fun refreshSelectedRow() { |
|
|
|
|
|
|
|
|
|
|
|
if (this.model.hasSelection()) { |
|
|
|
if (this.model.hasSelection()) { |
|
|
|
val index = this.model.currentSelection.index |
|
|
|
val index = this.model.currentSelection.index |
|
|
|
this.handHistoryAdapter.notifyItemChanged(index) |
|
|
|
this.handHistoryAdapter.notifyItemChanged(index) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// this.model.selectionLiveData.value?.index?.let { |
|
|
|
|
|
|
|
// Timber.d("refreshes row at index = $it") |
|
|
|
|
|
|
|
// this.handHistoryAdapter.notifyItemChanged(it) |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
/*** |
|
|
|
@ -681,12 +675,8 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL |
|
|
|
|
|
|
|
|
|
|
|
val builder: AlertDialog.Builder = AlertDialog.Builder(context) |
|
|
|
val builder: AlertDialog.Builder = AlertDialog.Builder(context) |
|
|
|
builder.setTitle(R.string.position) |
|
|
|
builder.setTitle(R.string.position) |
|
|
|
builder.setItems( |
|
|
|
builder.setItems(arrayOf<CharSequence>(getString(R.string.remove))) { _, index -> |
|
|
|
arrayOf<CharSequence>( |
|
|
|
// The 'when' argument contains the index position |
|
|
|
getString(R.string.remove) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
) { _, index -> |
|
|
|
|
|
|
|
// The 'which' argument contains the index position |
|
|
|
|
|
|
|
// of the selected item |
|
|
|
// of the selected item |
|
|
|
when (index) { |
|
|
|
when (index) { |
|
|
|
0 -> this.removePlayer(positionIndex) |
|
|
|
0 -> this.removePlayer(positionIndex) |
|
|
|
@ -700,5 +690,4 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL |
|
|
|
this.model.clearSelection() |
|
|
|
this.model.clearSelection() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |