aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--AndroidManifest.xml1
-rw-r--r--src/eu/siacs/conversations/ui/ManageAccountActivity.java8
2 files changed, 6 insertions, 3 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4dce0d43..de398467 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -49,6 +49,7 @@
<activity
android:name="eu.siacs.conversations.ui.ManageAccountActivity"
android:label="Manage Accounts"
+ android:configChanges="orientation|screenSize"
android:parentActivityName="eu.siacs.conversations.ui.ConversationActivity" >
</activity>
<activity
diff --git a/src/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/eu/siacs/conversations/ui/ManageAccountActivity.java
index 624f1a7e..122c8eee 100644
--- a/src/eu/siacs/conversations/ui/ManageAccountActivity.java
+++ b/src/eu/siacs/conversations/ui/ManageAccountActivity.java
@@ -12,7 +12,6 @@ import eu.siacs.conversations.xmpp.OnTLSExceptionReceived;
import eu.siacs.conversations.xmpp.XmppConnection;
import android.app.Activity;
import android.app.AlertDialog;
-import android.content.ClipData.Item;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
@@ -44,6 +43,8 @@ public class ManageAccountActivity extends XmppActivity {
protected Account selectedAccountForActionMode = null;
protected ManageAccountActivity activity = this;
+ protected boolean firstrun = true;
+
protected List<Account> accountList = new ArrayList<Account>();
protected ListView accountListView;
protected ArrayAdapter<Account> accountListViewAdapter;
@@ -201,7 +202,7 @@ public class ManageAccountActivity extends XmppActivity {
activity.xmppConnectionService.reconnectAccount(accountList.get(position),true);
} else if (account.getStatus() == Account.STATUS_ONLINE) {
activity.startActivity(new Intent(activity.getApplicationContext(),ContactsActivity.class));
- } else if (account.isOptionSet(Account.OPTION_REGISTER)) {
+ } else if (account.getStatus() != Account.STATUS_DISABLED) {
editAccount(account);
}
} else {
@@ -382,9 +383,10 @@ public class ManageAccountActivity extends XmppActivity {
this.accountList.clear();
this.accountList.addAll(xmppConnectionService.getAccounts());
accountListViewAdapter.notifyDataSetChanged();
- if (this.accountList.size() == 0) {
+ if ((this.accountList.size() == 0)&&(this.firstrun)) {
getActionBar().setDisplayHomeAsUpEnabled(false);
addAccount();
+ this.firstrun = false;
}
}