improve change password.

This commit is contained in:
Phillip Thelen 2019-04-05 09:44:32 +02:00
parent d7a10324f7
commit 685d9edb92
4 changed files with 10 additions and 5 deletions

View file

@ -150,8 +150,8 @@ android {
buildConfigField "String", "STORE", "\"google\""
multiDexEnabled true
versionCode 2079
versionName "1.8"
versionCode 2082
versionName "1.8.1"
}
lintOptions {

View file

@ -11,7 +11,8 @@
<EditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:inputType="textPassword"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -20,7 +21,8 @@
<EditText
android:id="@+id/passwordEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:inputType="textPassword" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -29,5 +31,6 @@
<EditText
android:id="@+id/passwordRepeatEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:inputType="textPassword" />
</LinearLayout>

View file

@ -869,5 +869,6 @@
<string name="old_password">Old Password</string>
<string name="new_password">New Password</string>
<string name="new_password_repeat">Repeat new Password</string>
<string name="password_changed">Password successfully changed</string>
</resources>

View file

@ -107,6 +107,7 @@ class AuthenticationPreferenceFragment: BasePreferencesFragment() {
thisDialog.dismiss()
userRepository.updatePassword(oldPasswordEditText?.text.toString(), passwordEditText?.text.toString(), passwordRepeatEditText?.text.toString())
.subscribe(Consumer {
Toast.makeText(activity, R.string.password_changed, Toast.LENGTH_SHORT).show()
}, RxErrorHandler.handleEmptyError())
}
.setNegativeButton(R.string.action_cancel) { thisDialog, _ -> thisDialog.dismiss() }