diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-01-23 11:39:02 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-01-23 11:39:02 +0100 |
commit | 43521891f0114d050c1ae8bf3d76d5ad4f1cf0a4 (patch) | |
tree | fcce055d36be2f23fe0d954172c011291bb7e3da /src/main/java/eu/siacs/conversations/crypto | |
parent | ba98fe4f864a7e9df9b001a84c5c4126c9d107be (diff) |
show fetch errors in trust keys activity
Diffstat (limited to 'src/main/java/eu/siacs/conversations/crypto')
-rw-r--r-- | src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java index c8253dd4..43a90010 100644 --- a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java +++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java @@ -79,6 +79,19 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded { } } + public boolean fetchMapHasErrors(Contact contact) { + Jid jid = contact.getJid().toBareJid(); + if (deviceIds.get(jid) != null) { + for (Integer foreignId : this.deviceIds.get(jid)) { + AxolotlAddress address = new AxolotlAddress(jid.toString(), foreignId); + if (fetchStatusMap.getAll(address).containsValue(FetchStatus.ERROR)) { + return true; + } + } + } + return false; + } + private static class AxolotlAddressMap<T> { protected Map<String, Map<Integer, T>> map; protected final Object MAP_LOCK = new Object(); |