aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/services
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-03-29 23:22:19 +0200
committerChristian Schneppe <christian@pix-art.de>2018-03-29 23:22:19 +0200
commit0e597dcc357703317c23d6ef2c1780d7fd3f789f (patch)
tree9d6367948d39adde9ee4065617081fa5b8e40a9f /src/main/java/de/pixart/messenger/services
parentd06e09b9573179db2dce897ea310e80c26940dda (diff)
redirect on empty conversation list
Diffstat (limited to 'src/main/java/de/pixart/messenger/services')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index 2c2f0b2d4..5353e003c 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -1836,6 +1836,19 @@ public class XmppConnectionService extends Service {
return null;
}
+ public boolean isConversationsListEmpty(final Conversation ignore) {
+ synchronized (this.conversations) {
+ final int size = this.conversations.size();
+ if (size == 0) {
+ return true;
+ } else if (size == 1) {
+ return this.conversations.get(0) == ignore;
+ } else {
+ return false;
+ }
+ }
+ }
+
public Conversation findOrCreateConversation(Account account, Jid jid, boolean muc, final boolean async) {
return this.findOrCreateConversation(account, jid, muc, false, async);
}
@@ -4131,7 +4144,7 @@ public class XmppConnectionService extends Service {
public Account getPendingAccount() {
Account pending = null;
for (Account account : getAccounts()) {
- if (account.isOptionSet(Account.OPTION_REGISTER)) {
+ if (!account.isOptionSet(Account.OPTION_LOGGED_IN_SUCCESSFULLY)) {
pending = account;
} else {
return null;