Progress dialog not showing, now it is ok

This commit is contained in:
dtvv 2018-09-03 14:06:38 -06:00
parent e9551483f0
commit b7223e4997

View file

@ -103,7 +103,9 @@ class CreateSeedActivity : CustomActivity() {
val bitsharesAccountNameValidation = BitsharesAccountNameValidation(this, tietAccountName, uiValidatorListener) val bitsharesAccountNameValidation = BitsharesAccountNameValidation(this, tietAccountName, uiValidatorListener)
val onAccountExist = object : OnAccountExist { val onAccountExist = object : OnAccountExist {
override fun onAccountExists() { override fun onAccountExists() {
runOnUiThread { Toast.makeText(globalActivity, resources.getString(R.string.account_name_already_exist), Toast.LENGTH_LONG).show() } runOnUiThread {
Toast.makeText(globalActivity, resources.getString(R.string.account_name_already_exist), Toast.LENGTH_LONG).show()
}
} }
} }
@ -170,8 +172,10 @@ class CreateSeedActivity : CustomActivity() {
//Makes dialog to tell the user that the account is been created //Makes dialog to tell the user that the account is been created
val creatingAccountMaterialDialog = CrystalDialog(this) val creatingAccountMaterialDialog = CrystalDialog(this)
creatingAccountMaterialDialog.setText(this.resources.getString(R.string.window_create_seed_DialogMessage)) creatingAccountMaterialDialog.setText(this.resources.getString(R.string.window_create_seed_DialogMessage))
creatingAccountMaterialDialog.build() creatingAccountMaterialDialog.progress()
this@CreateSeedActivity.runOnUiThread { creatingAccountMaterialDialog.show() } this@CreateSeedActivity.runOnUiThread {
creatingAccountMaterialDialog.show()
}
request.setListener { request.setListener {
creatingAccountMaterialDialog.dismiss() creatingAccountMaterialDialog.dismiss()
if (request.status == ValidateCreateBitsharesAccountRequest.StatusCode.SUCCEEDED) { if (request.status == ValidateCreateBitsharesAccountRequest.StatusCode.SUCCEEDED) {
@ -184,7 +188,7 @@ class CreateSeedActivity : CustomActivity() {
} }
} }
val thread = object : Thread() { (object : Thread() {
override fun run() { override fun run() {
/* /*
@ -192,9 +196,7 @@ class CreateSeedActivity : CustomActivity() {
* Run thread*/ * Run thread*/
CryptoNetInfoRequests.getInstance().addRequest(request) CryptoNetInfoRequests.getInstance().addRequest(request)
} }
} }).start()
thread.start()
} }
/* /*