mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-17 11:19:01 +00:00
Update account delete to type 'DELETE' vs pw, updated description
This commit is contained in:
parent
c3240be6d8
commit
3b97f903c6
2 changed files with 10 additions and 14 deletions
|
|
@ -590,8 +590,9 @@
|
|||
<string name="reset_account_title">Are you sure you want to reset?</string>
|
||||
<string name="confirm_reset">Confirm reset</string>
|
||||
<string name="reset_account_description">You will lose all your levels, Gold, and Experience. All your tasks and their historical data will be deleted (Challenge tasks will stay). You will lose all equipment, including limited edition or subscriber equipment, but you will be able to buy it back (you will need to be the correct class to re-buy class-specific gear). You will keep your current class and your Pets and Mounts. To confirm reset, type RESET below.</string>
|
||||
<string name="delete_caps">DELETE</string>
|
||||
<string name="delete_account">Delete Account</string>
|
||||
<string name="delete_account_description">This will delete your account forever and it can never be restored! Banked or spent Gems will not be refunded. If you’re absolutely certain, type your password into the text box below.</string>
|
||||
<string name="delete_account_description">This will delete your account forever and it can never be restored! Banked or spent Gems will not be refunded. If you’re absolutely certain, type DELETE into the text box below.</string>
|
||||
<string name="delete_oauth_account_description">Deleted accounts are permanent and cannot be restored. Gems cannot be refunded. If you still want to delete, type DELETE below.</string>
|
||||
<string name="reset_account_confirmation">Reset my Account</string>
|
||||
<string name="delete_account_confirmation">Delete my Account</string>
|
||||
|
|
|
|||
|
|
@ -88,14 +88,12 @@ class HabiticaAccountDialog(private var thisContext: Context, private val accoun
|
|||
}
|
||||
|
||||
override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
||||
if (confirmationText?.length() != null) {
|
||||
if (confirmationText?.length()!! > 7) {
|
||||
confirmationAction?.setTextColor(ContextCompat.getColor(thisContext, R.color.red_100))
|
||||
confirmationAction?.alpha = 1.0f
|
||||
} else {
|
||||
confirmationAction?.setTextColor(ContextCompat.getColor(thisContext, R.color.gray_10))
|
||||
confirmationAction?.alpha = .4f
|
||||
}
|
||||
if (confirmationText?.text.toString() == context?.getString(R.string.delete_caps)) {
|
||||
confirmationAction?.setTextColor(ContextCompat.getColor(thisContext, R.color.red_100))
|
||||
confirmationAction?.alpha = 1.0f
|
||||
} else {
|
||||
confirmationAction?.setTextColor(ContextCompat.getColor(thisContext, R.color.gray_10))
|
||||
confirmationAction?.alpha = .4f
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -103,10 +101,8 @@ class HabiticaAccountDialog(private var thisContext: Context, private val accoun
|
|||
}
|
||||
})
|
||||
confirmationAction?.setOnClickListener {
|
||||
if (confirmationText?.length() != null) {
|
||||
if (confirmationText?.length()!! > 7) {
|
||||
accountUpdateConfirmed.deletionConfirmClicked(confirmationText?.text.toString())
|
||||
}
|
||||
if (confirmationText?.text.toString() == context?.getString(R.string.delete_caps)) {
|
||||
accountUpdateConfirmed.resetConfirmedClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -127,7 +123,6 @@ class HabiticaAccountDialog(private var thisContext: Context, private val accoun
|
|||
|
||||
|
||||
interface AccountUpdateConfirmed {
|
||||
//API currently does not take password to reset account
|
||||
fun resetConfirmedClicked()
|
||||
fun deletionConfirmClicked(confirmationString: String)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue