mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 09:25:49 +03:00
adding listener suffix for consistency
This commit is contained in:
parent
c4834a44d1
commit
c414f80fa6
2 changed files with 5 additions and 3 deletions
|
@ -19,6 +19,8 @@ package im.vector.app.core.extensions
|
|||
import android.text.Editable
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import androidx.core.view.doOnPreDraw
|
||||
import androidx.core.widget.doOnTextChanged
|
||||
import com.google.android.material.textfield.TextInputLayout
|
||||
import im.vector.app.core.platform.SimpleTextWatcher
|
||||
import kotlinx.coroutines.flow.map
|
||||
|
@ -46,7 +48,7 @@ fun TextInputLayout.associateContentStateWith(button: View) {
|
|||
})
|
||||
}
|
||||
|
||||
fun TextInputLayout.setOnImeDone(action: () -> Unit) {
|
||||
fun TextInputLayout.setOnImeDoneListener(action: () -> Unit) {
|
||||
editText?.setOnEditorActionListener { _, actionId, _ ->
|
||||
when (actionId) {
|
||||
EditorInfo.IME_ACTION_DONE -> {
|
||||
|
|
|
@ -25,7 +25,7 @@ import im.vector.app.core.extensions.associateContentStateWith
|
|||
import im.vector.app.core.extensions.content
|
||||
import im.vector.app.core.extensions.editText
|
||||
import im.vector.app.core.extensions.isEmail
|
||||
import im.vector.app.core.extensions.setOnImeDone
|
||||
import im.vector.app.core.extensions.setOnImeDoneListener
|
||||
import im.vector.app.databinding.FragmentFtueEmailInputBinding
|
||||
import im.vector.app.features.onboarding.OnboardingAction
|
||||
import im.vector.app.features.onboarding.OnboardingViewState
|
||||
|
@ -49,7 +49,7 @@ class FtueAuthEmailEntryFragment @Inject constructor() : AbstractFtueAuthFragmen
|
|||
|
||||
private fun setupViews() {
|
||||
views.emailEntryInput.associateContentStateWith(button = views.emailEntrySubmit)
|
||||
views.emailEntryInput.setOnImeDone { updateEmail() }
|
||||
views.emailEntryInput.setOnImeDoneListener { updateEmail() }
|
||||
views.emailEntrySubmit.debouncedClicks { updateEmail() }
|
||||
|
||||
views.emailEntryInput.editText().textChanges()
|
||||
|
|
Loading…
Reference in a new issue