diff options
author | Christian S <christian@pix-art.de> | 2016-04-11 19:52:37 +0200 |
---|---|---|
committer | Christian S <christian@pix-art.de> | 2016-04-11 19:52:37 +0200 |
commit | a096fb7c8bdabc609f0cf9ff3786c159a048d82c (patch) | |
tree | 7b0a50d4ac6dc713b613898884a9946667b6a16a /src/main/java/eu/siacs/conversations/ui | |
parent | ec870c793a3429519cc42971c45a446d946f1dd4 (diff) | |
parent | 23a0beab43a5f30baf6481afeb9188b86df0b32d (diff) |
Merge remote-tracking branch 'refs/remotes/siacs/master' into development
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index 787c325ae..a8b667cee 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -241,12 +241,11 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate mFetchingAvatar = true; xmppConnectionService.checkForAvatar(mAccount, mAvatarFetchCallback); } - } else { - updateSaveButton(); } if (mAccount != null) { updateAccountInformation(false); } + updateSaveButton(); } @Override @@ -335,7 +334,8 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate this.mSaveButton.setText(R.string.save); this.mSaveButton.setEnabled(true); this.mSaveButton.setTextColor(getPrimaryTextColor()); - } else if (mAccount != null && (mAccount.getStatus() == Account.State.CONNECTING || mFetchingAvatar)) { + } else if (mAccount != null + && (mAccount.getStatus() == Account.State.CONNECTING || mAccount.getStatus() == Account.State.REGISTRATION_SUCCESSFUL|| mFetchingAvatar)) { this.mSaveButton.setEnabled(false); this.mSaveButton.setTextColor(getSecondaryTextColor()); this.mSaveButton.setText(R.string.account_status_connecting); @@ -536,6 +536,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate protected void onBackendConnected() { if (this.jidToEdit != null) { this.mAccount = xmppConnectionService.findAccountByJid(jidToEdit); + this.mInitMode |= this.mAccount.isOptionSet(Account.OPTION_REGISTER); if (this.mAccount != null) { if (this.mAccount.getPrivateKeyAlias() != null) { this.mPassword.setHint(R.string.authenticate_with_certificate); @@ -631,6 +632,8 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate if (!mInitMode) { this.mAvatar.setVisibility(View.VISIBLE); this.mAvatar.setImageBitmap(avatarService().get(this.mAccount, getPixel(Config.AVATAR_SIZE))); + } else { + this.mAvatar.setVisibility(View.GONE); } if (this.mAccount.isOptionSet(Account.OPTION_REGISTER)) { this.mRegisterNew.setVisibility(View.VISIBLE); |