jump right into edit account if now accounts are configured
This commit is contained in:
parent
d504daec16
commit
e0b759340d
|
@ -86,7 +86,7 @@
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:visibility="visible" >
|
android:visibility="gone" >
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
|
|
|
@ -628,8 +628,7 @@ public class ConversationActivity extends XmppActivity {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (xmppConnectionService.getAccounts().size() == 0) {
|
if (xmppConnectionService.getAccounts().size() == 0) {
|
||||||
startActivity(new Intent(this, ManageAccountActivity.class));
|
startActivity(new Intent(this, EditAccountActivity.class));
|
||||||
finish();
|
|
||||||
} else if (conversationList.size() <= 0) {
|
} else if (conversationList.size() <= 0) {
|
||||||
// add no history
|
// add no history
|
||||||
startActivity(new Intent(this, StartConversationActivity.class));
|
startActivity(new Intent(this, StartConversationActivity.class));
|
||||||
|
|
|
@ -116,7 +116,13 @@ public class EditAccountActivity extends XmppActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (jidToEdit == null && mAccount != null
|
if (mAccount != null
|
||||||
|
&& mAccount.getStatus() != Account.STATUS_ONLINE
|
||||||
|
&& mFetchingAvatar) {
|
||||||
|
startActivity(new Intent(getApplicationContext(),
|
||||||
|
ManageAccountActivity.class));
|
||||||
|
finish();
|
||||||
|
} else if (jidToEdit == null && mAccount != null
|
||||||
&& mAccount.getStatus() == Account.STATUS_ONLINE) {
|
&& mAccount.getStatus() == Account.STATUS_ONLINE) {
|
||||||
if (!mFetchingAvatar) {
|
if (!mFetchingAvatar) {
|
||||||
mFetchingAvatar = true;
|
mFetchingAvatar = true;
|
||||||
|
@ -273,6 +279,7 @@ public class EditAccountActivity extends XmppActivity {
|
||||||
getActionBar().setDisplayHomeAsUpEnabled(false);
|
getActionBar().setDisplayHomeAsUpEnabled(false);
|
||||||
getActionBar().setDisplayShowHomeEnabled(false);
|
getActionBar().setDisplayShowHomeEnabled(false);
|
||||||
this.mCancelButton.setEnabled(false);
|
this.mCancelButton.setEnabled(false);
|
||||||
|
this.mCancelButton.setTextColor(getSecondaryTextColor());
|
||||||
}
|
}
|
||||||
this.mAccountJid.setAdapter(this.mKnownHostsAdapter);
|
this.mAccountJid.setAdapter(this.mKnownHostsAdapter);
|
||||||
updateSaveButton();
|
updateSaveButton();
|
||||||
|
@ -289,7 +296,8 @@ public class EditAccountActivity extends XmppActivity {
|
||||||
this.mRegisterNew.setVisibility(View.GONE);
|
this.mRegisterNew.setVisibility(View.GONE);
|
||||||
this.mRegisterNew.setChecked(false);
|
this.mRegisterNew.setChecked(false);
|
||||||
}
|
}
|
||||||
if (this.mAccount.getStatus() == Account.STATUS_ONLINE && !this.mFetchingAvatar) {
|
if (this.mAccount.getStatus() == Account.STATUS_ONLINE
|
||||||
|
&& !this.mFetchingAvatar) {
|
||||||
this.mStats.setVisibility(View.VISIBLE);
|
this.mStats.setVisibility(View.VISIBLE);
|
||||||
this.mSessionEst.setText(UIHelper.readableTimeDifference(
|
this.mSessionEst.setText(UIHelper.readableTimeDifference(
|
||||||
getApplicationContext(), this.mAccount.getXmppConnection()
|
getApplicationContext(), this.mAccount.getXmppConnection()
|
||||||
|
@ -298,7 +306,8 @@ public class EditAccountActivity extends XmppActivity {
|
||||||
if (features.carbons()) {
|
if (features.carbons()) {
|
||||||
this.mServerInfoCarbons.setText(R.string.server_info_available);
|
this.mServerInfoCarbons.setText(R.string.server_info_available);
|
||||||
} else {
|
} else {
|
||||||
this.mServerInfoCarbons.setText(R.string.server_info_unavailable);
|
this.mServerInfoCarbons
|
||||||
|
.setText(R.string.server_info_unavailable);
|
||||||
}
|
}
|
||||||
if (features.sm()) {
|
if (features.sm()) {
|
||||||
this.mServerInfoSm.setText(R.string.server_info_available);
|
this.mServerInfoSm.setText(R.string.server_info_available);
|
||||||
|
@ -310,7 +319,8 @@ public class EditAccountActivity extends XmppActivity {
|
||||||
} else {
|
} else {
|
||||||
this.mServerInfoPep.setText(R.string.server_info_unavailable);
|
this.mServerInfoPep.setText(R.string.server_info_unavailable);
|
||||||
}
|
}
|
||||||
String fingerprint = this.mAccount.getOtrFingerprint(getApplicationContext());
|
String fingerprint = this.mAccount
|
||||||
|
.getOtrFingerprint(getApplicationContext());
|
||||||
if (fingerprint != null) {
|
if (fingerprint != null) {
|
||||||
this.mOtrFingerprintHeadline.setVisibility(View.VISIBLE);
|
this.mOtrFingerprintHeadline.setVisibility(View.VISIBLE);
|
||||||
this.mOtrFingerprint.setVisibility(View.VISIBLE);
|
this.mOtrFingerprint.setVisibility(View.VISIBLE);
|
||||||
|
|
Loading…
Reference in a new issue