aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-04-20 21:32:03 +0200
committersteckbrief <steckbrief@chefmail.de>2016-04-20 21:32:03 +0200
commit70938a31a0e78203449d769fa5bda15ce73d1ed4 (patch)
treed789c0c44b26bdeeedde286ab3e09a67c3dd0e5b /src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java
parent58572ba858835437011d2f450bd90fb93455b5c9 (diff)
parent7df96caedbbb96a28d4f7e07fa2d159c8ca1373f (diff)
Merge branch 'master' into message_display_rework
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java b/src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java
index 2b8e619f..1a868949 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java
@@ -39,6 +39,7 @@ import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import de.thedevstack.conversationsplus.ConversationsPlusColors;
+import de.thedevstack.conversationsplus.ConversationsPlusPreferences;
import de.thedevstack.conversationsplus.ui.listeners.ShowResourcesListDialogListener;
import de.thedevstack.conversationsplus.Config;
import de.thedevstack.conversationsplus.R;
@@ -246,12 +247,11 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
mFetchingAvatar = true;
AvatarService.getInstance().checkForAvatar(mAccount, mAvatarFetchCallback);
}
- } else {
- updateSaveButton();
}
if (mAccount != null) {
updateAccountInformation(false);
}
+ updateSaveButton();
}
@Override
@@ -522,8 +522,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
}
}
}
- SharedPreferences preferences = getPreferences();
- this.mShowOptions = preferences.getBoolean("show_connection_options", false);
+ this.mShowOptions = ConversationsPlusPreferences.showConnectionOptions();
this.mNamePort.setVisibility(mShowOptions ? View.VISIBLE : View.GONE);
}
@@ -531,6 +530,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);
@@ -625,6 +625,8 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
if (!mInitMode) {
this.mAvatar.setVisibility(View.VISIBLE);
this.mAvatar.setImageBitmap(AvatarService.getInstance().get(this.mAccount, getPixel(72)));
+ } else {
+ this.mAvatar.setVisibility(View.GONE);
}
if (this.mAccount.isOptionSet(Account.OPTION_REGISTER)) {
this.mRegisterNew.setVisibility(View.VISIBLE);