diff options
author | steckbrief <steckbrief@chefmail.de> | 2017-08-07 12:57:57 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2017-08-07 12:57:57 +0200 |
commit | a892bb6f1685b84b74ba37e5a6a24ee8fb45eee7 (patch) | |
tree | f6d8036841f961dd987c2fb48e41983b327be049 /src/main/java/de/thedevstack/conversationsplus/utils | |
parent | be1992ce897d3b0551e545646a3e0f45cc6dd8c2 (diff) |
Simplifying introduction of new XEP implementations, implements FS#250 and FS#251 (Privacy and Security settings), refactoring of location of some interfaces
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/utils')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/utils/UiUpdateHelper.java | 9 | ||||
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/utils/XmppSendUtil.java | 6 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/utils/UiUpdateHelper.java b/src/main/java/de/thedevstack/conversationsplus/utils/UiUpdateHelper.java index 7638caad..4477f074 100644 --- a/src/main/java/de/thedevstack/conversationsplus/utils/UiUpdateHelper.java +++ b/src/main/java/de/thedevstack/conversationsplus/utils/UiUpdateHelper.java @@ -2,6 +2,7 @@ package de.thedevstack.conversationsplus.utils; import de.thedevstack.android.logcat.Logging; import de.thedevstack.conversationsplus.services.XmppConnectionService; +import de.thedevstack.conversationsplus.xmpp.OnUpdateBlocklist; /** * Helper class to avoid passing the xmppConnectionService to everywhere just to update the UI. @@ -49,4 +50,12 @@ public class UiUpdateHelper { Logging.e("UiUpdateHelper", "XMPP Connection Service not initialized. MUC Roster Ui not updated."); } } + + public static void updateBlocklistUi(final OnUpdateBlocklist.Status status) { + if (null != UiUpdateHelper.xmppConnectionService) { + UiUpdateHelper.xmppConnectionService.updateBlocklistUi(status); + } else { + Logging.e("UiUpdateHelper", "XMPP Connection Service not initialized.Blocklist Ui not updated."); + } + } } diff --git a/src/main/java/de/thedevstack/conversationsplus/utils/XmppSendUtil.java b/src/main/java/de/thedevstack/conversationsplus/utils/XmppSendUtil.java index 11d05832..67b70ef6 100644 --- a/src/main/java/de/thedevstack/conversationsplus/utils/XmppSendUtil.java +++ b/src/main/java/de/thedevstack/conversationsplus/utils/XmppSendUtil.java @@ -8,9 +8,13 @@ import de.thedevstack.conversationsplus.xmpp.stanzas.MessagePacket; import de.thedevstack.conversationsplus.xmpp.stanzas.PresencePacket; /** - * Created by tzur on 09.01.2016. + * */ public class XmppSendUtil { + public static void sendIqPacket(Account account, IqPacket packet) { + sendIqPacket(account, packet, null); + } + public static void sendIqPacket(Account account, IqPacket packet, OnIqPacketReceived callback) { final XmppConnection connection = account.getXmppConnection(); if (connection != null) { |