aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-02-22 21:18:32 +0100
committerChristian Schneppe <christian@pix-art.de>2018-02-22 21:18:32 +0100
commit1ac439b54d09ae908684d81bf0e448b42c17c11f (patch)
tree066f4d6c0aaa06974e2ea38f20d8a1608fee6667 /src/main
parent472a6d44f3bbf6c76ffa32d4f203127119890eac (diff)
request disco items before disco#info on first connect
should make initial connect faster because code is not waiting for omemo code to run
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/XmppConnection.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
index 418ea1982..a64175cb3 100644
--- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
+++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
@@ -1233,6 +1233,10 @@ public class XmppConnection implements Runnable {
if (hash != null && ver != null) {
discoveryResult = mXmppConnectionService.getCachedServiceDiscoveryResult(new Pair<>(hash, ver));
}
+ final boolean requestDiscoItemsFirst = !account.isOptionSet(Account.OPTION_LOGGED_IN_SUCCESSFULLY);
+ if (requestDiscoItemsFirst) {
+ sendServiceDiscoveryItems(account.getServer());
+ }
if (discoveryResult == null) {
sendServiceDiscoveryInfo(account.getServer());
} else {
@@ -1240,7 +1244,9 @@ public class XmppConnection implements Runnable {
disco.put(account.getServer(), discoveryResult);
}
sendServiceDiscoveryInfo(account.getJid().toBareJid());
- sendServiceDiscoveryItems(account.getServer());
+ if (!requestDiscoItemsFirst) {
+ sendServiceDiscoveryItems(account.getServer());
+ }
if (!mWaitForDisco.get()) {
finalizeBind();