From aa5444b24c46f1e3a83682a59e71c780e2523160 Mon Sep 17 00:00:00 2001 From: Alex Clayton Date: Thu, 17 Mar 2016 09:57:40 +0000 Subject: Add signal for VCard Retrieval Error in VCardManager. As per patch 'improve profile editing UX when vCard is not supported' (4da2f1c85f2eeac9fb98d5dcc9097eeed9b34e8b). Test-information: Unit tests still pass. Change-Id: Ic5b0e24ac54eaf97c9a4cd1754219a05b59684e4 diff --git a/src/com/isode/stroke/vcards/VCardManager.java b/src/com/isode/stroke/vcards/VCardManager.java index 082aeeb..251b787 100644 --- a/src/com/isode/stroke/vcards/VCardManager.java +++ b/src/com/isode/stroke/vcards/VCardManager.java @@ -29,6 +29,11 @@ public class VCardManager { public final Signal2 onVCardChanged = new Signal2(); /** + * Emitted when we received an error on looking up a vCard. + */ + public final Signal2 onVCardRetrievalError = new Signal2(); + + /** * Emitted when our own vcard changes. * * onVCardChanged will also be emitted. @@ -91,6 +96,9 @@ public class VCardManager { JID jid = actualJID.isValid() ? actualJID : ownJID.toBare(); setVCard(jid, vcard); } + else { + onVCardRetrievalError.emit(actualJID, error); + } } public SetVCardRequest createSetVCardRequest(final VCard vcard) { -- cgit v0.10.2-6-g49f6