diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/XmppActivity.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java index 602486c05..f38f270d6 100644 --- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java @@ -994,9 +994,10 @@ public abstract class XmppActivity extends Activity { if (requestCode == REQUEST_INVITE_TO_CONVERSATION && resultCode == RESULT_OK) { mPendingConferenceInvite = ConferenceInvite.parse(data); if (xmppConnectionServiceBound && mPendingConferenceInvite != null) { - mPendingConferenceInvite.execute(this); - mToast = Toast.makeText(this, R.string.creating_conference,Toast.LENGTH_LONG); - mToast.show(); + if (mPendingConferenceInvite.execute(this)) { + mToast = Toast.makeText(this, R.string.creating_conference, Toast.LENGTH_LONG); + mToast.show(); + } mPendingConferenceInvite = null; } } @@ -1234,19 +1235,21 @@ public abstract class XmppActivity extends Activity { return invite; } - public void execute(XmppActivity activity) { + public boolean execute(XmppActivity activity) { XmppConnectionService service = activity.xmppConnectionService; Conversation conversation = service.findConversationByUuid(this.uuid); if (conversation == null) { - return; + return false; } if (conversation.getMode() == Conversation.MODE_MULTI) { for (Jid jid : jids) { service.invite(conversation, jid); } + return false; } else { jids.add(conversation.getJid().toBareJid()); service.createAdhocConference(conversation.getAccount(), null, jids, activity.adhocCallback); + return true; } } } |