Skip to content

Commit

Permalink
Rename loader on xml
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemHryhorovGeniusee committed Dec 1, 2021
1 parent f1ce4e8 commit 0f428b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class CreateAccountActivity : BaseActivity() {
})

registrationViewModel.accountRegistrationResult.observe(this) { isRegistered ->
binding.proposalsLoader.visibility = View.INVISIBLE
binding.loader.visibility = View.INVISIBLE
if (isRegistered) {
navigateToConnectionOrHome(isBackTransition = false)
finish()
Expand All @@ -95,7 +95,7 @@ class CreateAccountActivity : BaseActivity() {
}
}
registrationViewModel.accountRegistrationError.observe(this) {
binding.proposalsLoader.visibility = View.INVISIBLE
binding.loader.visibility = View.INVISIBLE
detailedErrorPopUp(it.localizedMessage ?: it.toString()) {
registrationViewModel.tryRegisterAccount()
}
Expand Down Expand Up @@ -134,7 +134,7 @@ class CreateAccountActivity : BaseActivity() {
}

private fun applyNewIdentity(newIdentityAddress: String) {
binding.proposalsLoader.visibility = View.VISIBLE
binding.loader.visibility = View.VISIBLE

viewModel.applyNewIdentity(newIdentityAddress).observe(this, {
it.onSuccess { identity ->
Expand All @@ -146,7 +146,7 @@ class CreateAccountActivity : BaseActivity() {
}

it.onFailure { error ->
binding.proposalsLoader.visibility = View.GONE
binding.loader.visibility = View.GONE
detailedErrorPopUp(error.localizedMessage ?: error.toString()) {
applyNewIdentity(newIdentityAddress)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:layout_height="match_parent">

<com.airbnb.lottie.LottieAnimationView
android:id="@+id/proposalsLoader"
android:id="@+id/loader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
Expand Down

0 comments on commit 0f428b2

Please sign in to comment.