hiding the reset password input by default

This commit is contained in:
Adam Brown 2022-06-08 09:07:32 +01:00
parent 7ef8193a93
commit 47cedfb522
2 changed files with 15 additions and 2 deletions

View File

@ -26,6 +26,7 @@ import dagger.hilt.android.AndroidEntryPoint
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.hidePassword
import im.vector.app.core.extensions.isEmail
import im.vector.app.core.extensions.setOnImeDoneListener
import im.vector.app.databinding.FragmentFtueResetPasswordInputBinding
@ -74,7 +75,11 @@ class FtueAuthResetPasswordEntryFragment : AbstractFtueAuthFragment<FragmentFtue
}
override fun updateWithState(state: OnboardingViewState) {
views.entrySignOutAll.isVisible = state.resetState.supportsLogoutAllDevices
views.signedOutAllGroup.isVisible = state.resetState.supportsLogoutAllDevices
if (state.isLoading) {
views.emailEntryInput.editText().hidePassword()
}
}
override fun resetViewModel() {

View File

@ -89,6 +89,7 @@
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/emailEntryInput"
style="@style/Widget.Vector.TextInputLayout.Password"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/ftue_auth_new_password_entry_title"
@ -102,11 +103,17 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:imeOptions="actionDone"
android:inputType="textEmailAddress"
android:inputType="textPassword"
android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout>
<androidx.constraintlayout.widget.Group
android:id="@+id/signedOutAllGroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="entrySignOutAll,signOutAllLabel" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/entrySignOutAll"
android:layout_width="wrap_content"
@ -120,6 +127,7 @@
app:layout_constraintTop_toBottomOf="@id/emailEntryInput" />
<TextView
android:id="@+id/signOutAllLabel"
style="@style/Widget.Vector.TextView.Subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"