diff --git a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryFragment.kt b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryFragment.kt index 3534f11c..9d996a33 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryFragment.kt +++ b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryFragment.kt @@ -270,9 +270,6 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL this.save() } -// if (this.model.isEdited && this.model.isNew) { -// this.findNextActionToEdit(0) -// } this.handHistoryAdapter.notifyDataSetChanged() } @@ -377,7 +374,6 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL HandRowType.HERO_POSITION -> { this.model.setHeroPosition(value as Position) this.handHistoryAdapter.notifyDataSetChanged() -// this.handHistoryAdapter.notifyItemChanged(this.indexOfRowRepresentable(row)) } HandRowType.PLAYER_POSITION -> { this.model.createPlayerSetupForPosition(value as Position) @@ -633,6 +629,7 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL private fun removePlayer(positionIndex: Int) { this.model.removePlayerSetup(positionIndex) + this.model.clearSelection() } /*** diff --git a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/HandHistoryViewModel.kt b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/HandHistoryViewModel.kt index a57aa4dc..b4ed3e6d 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/HandHistoryViewModel.kt +++ b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/HandHistoryViewModel.kt @@ -1008,4 +1008,8 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra this.createRowRepresentation() } + fun clearSelection() { + this.selectionLiveData.value = null + } + } \ No newline at end of file