|
|
|
|
@ -26,7 +26,6 @@ import net.pokeranalytics.android.ui.fragment.components.bottomsheet.BottomSheet |
|
|
|
|
import net.pokeranalytics.android.ui.modules.handhistory.model.* |
|
|
|
|
import net.pokeranalytics.android.ui.modules.handhistory.views.KeyboardListener |
|
|
|
|
import net.pokeranalytics.android.ui.view.RowRepresentable |
|
|
|
|
import net.pokeranalytics.android.ui.view.RowRepresentableEditDescriptor |
|
|
|
|
import net.pokeranalytics.android.ui.view.SmoothScrollLinearLayoutManager |
|
|
|
|
import net.pokeranalytics.android.util.extensions.findById |
|
|
|
|
import timber.log.Timber |
|
|
|
|
@ -140,27 +139,6 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL |
|
|
|
|
this.animateKeyboard(false) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// val keyboard = row.keyboardForTag(it.tag) |
|
|
|
|
// when (keyboard) { |
|
|
|
|
// HHKeyboard.ACTION -> { |
|
|
|
|
// configureActionKeyboard() |
|
|
|
|
// } |
|
|
|
|
// HHKeyboard.AMOUNT -> { |
|
|
|
|
// retrieveEditTextInputConnection(selection) |
|
|
|
|
// } |
|
|
|
|
// else -> {} |
|
|
|
|
// } |
|
|
|
|
// |
|
|
|
|
// keyboard?.let { kb -> |
|
|
|
|
//// this.animateKeyboard(true) |
|
|
|
|
// this.showKeyboard(kb) { |
|
|
|
|
// this.scrollToPosition(selection.index) |
|
|
|
|
// } |
|
|
|
|
//// this.keyboard.show(it) |
|
|
|
|
// } ?: run { |
|
|
|
|
// this.animateKeyboard(false) |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
} ?: run { |
|
|
|
|
this.animateKeyboard(false) |
|
|
|
|
} |
|
|
|
|
@ -275,7 +253,7 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL |
|
|
|
|
when (row.bottomSheetType) { // Comment, number of players |
|
|
|
|
BottomSheetType.NONE -> {} |
|
|
|
|
else -> { |
|
|
|
|
val editDescriptors = listOf(RowRepresentableEditDescriptor(this.model.handHistory.comment, R.string.comment)) |
|
|
|
|
val editDescriptors = this.model.editDescriptors(row) |
|
|
|
|
BottomSheetFragment.create(this.fragmentManager, row, this, editDescriptors, alternativeLabels = true) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
@ -309,7 +287,11 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL |
|
|
|
|
} |
|
|
|
|
HandRowType.ANTE -> { |
|
|
|
|
this.model.setAnte(value as Double? ?: 0.0) |
|
|
|
|
this.handHistoryAdapter.notifyItemChanged(this.indexOfRowRepresentable(row)) |
|
|
|
|
this.handHistoryAdapter.notifyDataSetChanged() |
|
|
|
|
} |
|
|
|
|
HandRowType.BIG_BLIND_ANTE -> { |
|
|
|
|
this.model.setBigBlindAnte(value as Boolean) |
|
|
|
|
this.handHistoryAdapter.notifyDataSetChanged() |
|
|
|
|
} |
|
|
|
|
is ComputedAction -> { |
|
|
|
|
this.model.currentAmount = value as String |
|
|
|
|
|