File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
java/com/github/code/gambit Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package com.github.code.gambit.repositories.profile
2
2
3
3
import com.amazonaws.AmazonClientException
4
4
import com.amazonaws.services.cognitoidentityprovider.model.InvalidParameterException
5
+ import com.amazonaws.services.cognitoidentityprovider.model.LimitExceededException
5
6
import com.github.code.gambit.data.model.User
6
7
import com.github.code.gambit.data.remote.NetworkDataSource
7
8
import com.github.code.gambit.data.remote.services.auth.AuthService
@@ -57,6 +58,9 @@ constructor(
57
58
val result = authService.resetPassword(oldPassword, newPassword)
58
59
if (result is ServiceResult .Error ) {
59
60
when (result.exception.cause) {
61
+ is LimitExceededException -> {
62
+ ServiceResult .Error (result.exception)
63
+ }
60
64
is InvalidParameterException -> {
61
65
ServiceResult .Error (Exception (" Invalid old password" ))
62
66
}
Original file line number Diff line number Diff line change @@ -109,8 +109,6 @@ class ProfileFragment : Fragment(R.layout.fragment_profile) {
109
109
binding.changePasswordButton.setOnClickListener(changePasswordListener2)
110
110
}
111
111
changePasswordListener2 = View .OnClickListener {
112
- binding.changePasswordButton.text = getString(R .string.change_password)
113
-
114
112
val oldPassword = binding.oldPassword.editText!! .text.toString().trim()
115
113
val newPassword = binding.newPassword.editText!! .text.toString().trim()
116
114
if (! isValidatePassword(oldPassword, newPassword)) {
Original file line number Diff line number Diff line change 160
160
<item name =" android:textAllCaps" >true</item >
161
161
<item name =" android:textSize" >12sp</item >
162
162
<item name =" android:textColor" >@color/secondary</item >
163
+ <item name =" android:textAlignment" >center</item >
163
164
</style >
164
165
165
166
<style name =" ShapeAppearance.App.SmallComponent" parent =" ShapeAppearance.MaterialComponents.SmallComponent" >
You can’t perform that action at this time.
0 commit comments