summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Clayton <alex.clayton@isode.com>2016-03-17 09:57:40 (GMT)
committerAlex Clayton <alex.clayton@isode.com>2016-03-22 11:18:10 (GMT)
commitaa5444b24c46f1e3a83682a59e71c780e2523160 (patch)
treee8619c4a236abf4333658b72640ef7af7d5e93f5
parent59315e2f10c01451115b66b9f285e26735bbacbf (diff)
downloadstroke-aa5444b24c46f1e3a83682a59e71c780e2523160.zip
stroke-aa5444b24c46f1e3a83682a59e71c780e2523160.tar.bz2
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
-rw-r--r--src/com/isode/stroke/vcards/VCardManager.java8
1 files changed, 8 insertions, 0 deletions
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<JID, VCard> onVCardChanged = new Signal2<JID, VCard>();
/**
+ * Emitted when we received an error on looking up a vCard.
+ */
+ public final Signal2<JID,ErrorPayload> onVCardRetrievalError = new Signal2<JID,ErrorPayload>();
+
+ /**
* 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) {