File tree Expand file tree Collapse file tree
java/com/github/code/gambit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package com.github.code.gambit.repositories.profile
22
33import com.amazonaws.AmazonClientException
44import com.amazonaws.services.cognitoidentityprovider.model.InvalidParameterException
5+ import com.amazonaws.services.cognitoidentityprovider.model.LimitExceededException
56import com.github.code.gambit.data.model.User
67import com.github.code.gambit.data.remote.NetworkDataSource
78import com.github.code.gambit.data.remote.services.auth.AuthService
@@ -57,6 +58,9 @@ constructor(
5758 val result = authService.resetPassword(oldPassword, newPassword)
5859 if (result is ServiceResult .Error ) {
5960 when (result.exception.cause) {
61+ is LimitExceededException -> {
62+ ServiceResult .Error (result.exception)
63+ }
6064 is InvalidParameterException -> {
6165 ServiceResult .Error (Exception (" Invalid old password" ))
6266 }
Original file line number Diff line number Diff line change @@ -109,8 +109,6 @@ class ProfileFragment : Fragment(R.layout.fragment_profile) {
109109 binding.changePasswordButton.setOnClickListener(changePasswordListener2)
110110 }
111111 changePasswordListener2 = View .OnClickListener {
112- binding.changePasswordButton.text = getString(R .string.change_password)
113-
114112 val oldPassword = binding.oldPassword.editText!! .text.toString().trim()
115113 val newPassword = binding.newPassword.editText!! .text.toString().trim()
116114 if (! isValidatePassword(oldPassword, newPassword)) {
Original file line number Diff line number Diff line change 160160 <item name =" android:textAllCaps" >true</item >
161161 <item name =" android:textSize" >12sp</item >
162162 <item name =" android:textColor" >@color/secondary</item >
163+ <item name =" android:textAlignment" >center</item >
163164 </style >
164165
165166 <style name =" ShapeAppearance.App.SmallComponent" parent =" ShapeAppearance.MaterialComponents.SmallComponent" >
You can’t perform that action at this time.
0 commit comments