|
|
|
|
@ -33,6 +33,7 @@ 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.SmoothScrollLinearLayoutManager |
|
|
|
|
import net.pokeranalytics.android.util.CrashLogging |
|
|
|
|
import net.pokeranalytics.android.util.extensions.findById |
|
|
|
|
import timber.log.Timber |
|
|
|
|
|
|
|
|
|
@ -160,14 +161,22 @@ class EditorFragment : RealmFragment(), RowRepresentableDelegate, KeyboardListen |
|
|
|
|
// At first, the selection is defined before the holder is bound, |
|
|
|
|
// so we retrieve the editText inputConnection once the recycler view has been rendered |
|
|
|
|
this.binding.recyclerView.viewTreeObserver.addOnGlobalLayoutListener { |
|
|
|
|
when (this.model.currentKeyboard) { |
|
|
|
|
HHKeyboard.AMOUNT -> { |
|
|
|
|
val selection = this.model.currentSelection |
|
|
|
|
retrieveEditTextInputConnection(selection) |
|
|
|
|
} |
|
|
|
|
else -> { |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
when (this.model.currentKeyboard) { |
|
|
|
|
HHKeyboard.AMOUNT -> { |
|
|
|
|
val selection = this.model.currentSelection |
|
|
|
|
retrieveEditTextInputConnection(selection) |
|
|
|
|
} |
|
|
|
|
else -> { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} catch (e: Exception) { |
|
|
|
|
val actions = this.model.actionListLogs |
|
|
|
|
CrashLogging.log(actions) |
|
|
|
|
throw e |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
initKeyboardDefaultHeight() |
|
|
|
|
|