In case the account already exists in the final step to créate an account set a toast message
This commit is contained in:
parent
f9b407de2f
commit
f0d6a935d1
2 changed files with 10 additions and 2 deletions
|
@ -9,6 +9,7 @@ import android.widget.Toast
|
||||||
import butterknife.ButterKnife
|
import butterknife.ButterKnife
|
||||||
import butterknife.OnClick
|
import butterknife.OnClick
|
||||||
import butterknife.OnTextChanged
|
import butterknife.OnTextChanged
|
||||||
|
import com.vincent.filepicker.ToastUtil
|
||||||
import cy.agorise.crystalwallet.R
|
import cy.agorise.crystalwallet.R
|
||||||
import cy.agorise.crystalwallet.dialogs.material.*
|
import cy.agorise.crystalwallet.dialogs.material.*
|
||||||
import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequests
|
import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequests
|
||||||
|
@ -181,7 +182,8 @@ class CreateSeedActivity : CustomActivity() {
|
||||||
override fun onPositive() {
|
override fun onPositive() {
|
||||||
|
|
||||||
// Make request to create a bitshare account
|
// Make request to create a bitshare account
|
||||||
val request = ValidateCreateBitsharesAccountRequest(tietAccountName?.getText().toString(), applicationContext)
|
var accountName:String = tietAccountName?.getText().toString().trim()
|
||||||
|
val request = ValidateCreateBitsharesAccountRequest(accountName, applicationContext)
|
||||||
|
|
||||||
//DTVV: Friday 27 July 2018
|
//DTVV: Friday 27 July 2018
|
||||||
//Makes dialog to tell the user that the account is been created
|
//Makes dialog to tell the user that the account is been created
|
||||||
|
@ -199,7 +201,12 @@ class CreateSeedActivity : CustomActivity() {
|
||||||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
|
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||||
intent.putExtra("SEED_ID", accountSeed.id)
|
intent.putExtra("SEED_ID", accountSeed.id)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
} else {
|
}
|
||||||
|
else if (request.status == ValidateCreateBitsharesAccountRequest.StatusCode.ACCOUNT_EXIST) {
|
||||||
|
ToastUtil.getInstance(globalActivity).showToast(globalActivity.getString(R.string.Account_already_exists))
|
||||||
|
disableCreate()
|
||||||
|
}
|
||||||
|
else {
|
||||||
fieldsValidator.validate()
|
fieldsValidator.validate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -514,6 +514,7 @@
|
||||||
<string name="pattern">Pattern</string>
|
<string name="pattern">Pattern</string>
|
||||||
<string name="new_user">New user?</string>
|
<string name="new_user">New user?</string>
|
||||||
<string name="existing_user">Existing user?</string>
|
<string name="existing_user">Existing user?</string>
|
||||||
|
<string name="Account_already_exists">Account already exists</string>
|
||||||
<string name="connection_status">Connection status</string>
|
<string name="connection_status">Connection status</string>
|
||||||
<string name="people_icon">People icon</string>
|
<string name="people_icon">People icon</string>
|
||||||
<string name="camera_feed_to_scan_qr">Camera feed to scan QR</string>
|
<string name="camera_feed_to_scan_qr">Camera feed to scan QR</string>
|
||||||
|
|
Loading…
Reference in a new issue