aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-07-16 13:42:52 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-07-16 13:42:52 +0200
commit6a329c7465b5aa6eab194071124269e2196456de (patch)
tree0d85e8e47648fdff66bf9de77fd5c82aa91be088 /src
parentbabbd389f68b1eb41dcd04f9cf586912aace4aef (diff)
fixed some ux glitches in editaccount
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java16
-rw-r--r--src/main/res/layout/message_received.xml1
-rw-r--r--src/main/res/layout/message_sent.xml1
3 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
index 931a1a2f..2bb506cd 100644
--- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
@@ -123,11 +123,11 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
mAccount.setOption(Account.OPTION_REGISTER, registerNewAccount);
xmppConnectionService.createAccount(mAccount);
}
- if (jidToEdit != null) {
+ if (jidToEdit != null && !mAccount.isOptionSet(Account.OPTION_DISABLED)) {
finish();
} else {
updateSaveButton();
- updateAccountInformation();
+ updateAccountInformation(true);
}
}
@@ -163,7 +163,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
updateSaveButton();
}
if (mAccount != null) {
- updateAccountInformation();
+ updateAccountInformation(false);
}
}
});
@@ -384,7 +384,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
xmppConnectionService.getKnownHosts());
if (this.jidToEdit != null) {
this.mAccount = xmppConnectionService.findAccountByJid(jidToEdit);
- updateAccountInformation();
+ updateAccountInformation(true);
} else if (this.xmppConnectionService.getAccounts().size() == 0) {
if (getActionBar() != null) {
getActionBar().setDisplayHomeAsUpEnabled(false);
@@ -419,9 +419,11 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
return super.onOptionsItemSelected(item);
}
- private void updateAccountInformation() {
- this.mAccountJid.setText(this.mAccount.getJid().toBareJid().toString());
- this.mPassword.setText(this.mAccount.getPassword());
+ private void updateAccountInformation(boolean init) {
+ if (init) {
+ this.mAccountJid.setText(this.mAccount.getJid().toBareJid().toString());
+ this.mPassword.setText(this.mAccount.getPassword());
+ }
if (this.jidToEdit != null) {
this.mAvatar.setVisibility(View.VISIBLE);
this.mAvatar.setImageBitmap(avatarService().get(this.mAccount, getPixel(72)));
diff --git a/src/main/res/layout/message_received.xml b/src/main/res/layout/message_received.xml
index 988fb593..44531b37 100644
--- a/src/main/res/layout/message_received.xml
+++ b/src/main/res/layout/message_received.xml
@@ -51,7 +51,6 @@
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/download_image"
android:visibility="gone" />
<LinearLayout
diff --git a/src/main/res/layout/message_sent.xml b/src/main/res/layout/message_sent.xml
index e0a82df8..f8365ad3 100644
--- a/src/main/res/layout/message_sent.xml
+++ b/src/main/res/layout/message_sent.xml
@@ -51,7 +51,6 @@
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/download_image"
android:visibility="gone" />
<LinearLayout