mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 17:52:17 -05:00
fixed some ux glitches in editaccount
This commit is contained in:
parent
babbd389f6
commit
6a329c7465
@ -123,11 +123,11 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
|
|||||||
mAccount.setOption(Account.OPTION_REGISTER, registerNewAccount);
|
mAccount.setOption(Account.OPTION_REGISTER, registerNewAccount);
|
||||||
xmppConnectionService.createAccount(mAccount);
|
xmppConnectionService.createAccount(mAccount);
|
||||||
}
|
}
|
||||||
if (jidToEdit != null) {
|
if (jidToEdit != null && !mAccount.isOptionSet(Account.OPTION_DISABLED)) {
|
||||||
finish();
|
finish();
|
||||||
} else {
|
} else {
|
||||||
updateSaveButton();
|
updateSaveButton();
|
||||||
updateAccountInformation();
|
updateAccountInformation(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -163,7 +163,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
|
|||||||
updateSaveButton();
|
updateSaveButton();
|
||||||
}
|
}
|
||||||
if (mAccount != null) {
|
if (mAccount != null) {
|
||||||
updateAccountInformation();
|
updateAccountInformation(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -384,7 +384,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
|
|||||||
xmppConnectionService.getKnownHosts());
|
xmppConnectionService.getKnownHosts());
|
||||||
if (this.jidToEdit != null) {
|
if (this.jidToEdit != null) {
|
||||||
this.mAccount = xmppConnectionService.findAccountByJid(jidToEdit);
|
this.mAccount = xmppConnectionService.findAccountByJid(jidToEdit);
|
||||||
updateAccountInformation();
|
updateAccountInformation(true);
|
||||||
} else if (this.xmppConnectionService.getAccounts().size() == 0) {
|
} else if (this.xmppConnectionService.getAccounts().size() == 0) {
|
||||||
if (getActionBar() != null) {
|
if (getActionBar() != null) {
|
||||||
getActionBar().setDisplayHomeAsUpEnabled(false);
|
getActionBar().setDisplayHomeAsUpEnabled(false);
|
||||||
@ -419,9 +419,11 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
|
|||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateAccountInformation() {
|
private void updateAccountInformation(boolean init) {
|
||||||
this.mAccountJid.setText(this.mAccount.getJid().toBareJid().toString());
|
if (init) {
|
||||||
this.mPassword.setText(this.mAccount.getPassword());
|
this.mAccountJid.setText(this.mAccount.getJid().toBareJid().toString());
|
||||||
|
this.mPassword.setText(this.mAccount.getPassword());
|
||||||
|
}
|
||||||
if (this.jidToEdit != null) {
|
if (this.jidToEdit != null) {
|
||||||
this.mAvatar.setVisibility(View.VISIBLE);
|
this.mAvatar.setVisibility(View.VISIBLE);
|
||||||
this.mAvatar.setImageBitmap(avatarService().get(this.mAccount, getPixel(72)));
|
this.mAvatar.setImageBitmap(avatarService().get(this.mAccount, getPixel(72)));
|
||||||
|
@ -51,7 +51,6 @@
|
|||||||
style="?android:attr/buttonStyleSmall"
|
style="?android:attr/buttonStyleSmall"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/download_image"
|
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -51,7 +51,6 @@
|
|||||||
style="?android:attr/buttonStyleSmall"
|
style="?android:attr/buttonStyleSmall"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/download_image"
|
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
Loading…
Reference in New Issue
Block a user