aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-10-04 12:52:05 +0200
committerChristian Schneppe <christian@pix-art.de>2018-10-04 12:52:05 +0200
commita1a0892d3586e2c1e67ff895f6c739282907c836 (patch)
tree21befbb8ba4db910b836bfa68a21ae03c5b1b618 /src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
parent018942c7d0127e6a5ac93dfaf496394655e1e4c7 (diff)
refresh ui after device list update only if list has changed
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
index 02062eba1..333c65fd9 100644
--- a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
+++ b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
@@ -483,9 +483,18 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
publishOwnDeviceId(deviceIds);
}
}
+ final Set<Integer> oldSet = this.deviceIds.get(jid);
+ final boolean changed = oldSet == null || oldSet.hashCode() != hash;
this.deviceIds.put(jid, deviceIds);
- mXmppConnectionService.updateConversationUi(); //update the lock icon
- mXmppConnectionService.keyStatusUpdated(null);
+ if (changed) {
+ mXmppConnectionService.updateConversationUi(); //update the lock icon
+ mXmppConnectionService.keyStatusUpdated(null);
+ if (me) {
+ mXmppConnectionService.updateAccountUi();
+ }
+ } else {
+ Log.d(Config.LOGTAG, "skipped device list update because it hasn't changed");
+ }
}
public void wipeOtherPepDevices() {