Fix screen rotation issue

This commit is contained in:
Benoit Marty 2019-06-10 14:13:14 +02:00
parent 598245531a
commit ad8baf8091
2 changed files with 4 additions and 3 deletions

View File

@ -16,6 +16,7 @@

package im.vector.riotredesign.features.form

import android.text.Editable
import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass
import com.google.android.material.textfield.TextInputEditText
@ -41,7 +42,7 @@ abstract class FormEditTextItem : VectorEpoxyModel<FormEditTextItem.Holder>() {
var onTextChange: ((String) -> Unit)? = null

private val onTextChangeListener = object : SimpleTextWatcher() {
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
override fun afterTextChanged(s: Editable) {
onTextChange?.invoke(s.toString())
}
}
@ -60,7 +61,7 @@ abstract class FormEditTextItem : VectorEpoxyModel<FormEditTextItem.Holder>() {
}

override fun shouldSaveViewState(): Boolean {
return true
return false
}

override fun unbind(holder: Holder) {

View File

@ -57,7 +57,7 @@ abstract class FormSwitchItem : VectorEpoxyModel<FormSwitchItem.Holder>() {
}

override fun shouldSaveViewState(): Boolean {
return true
return false
}

override fun unbind(holder: Holder) {