don't show 'create conference' toast on invite
This commit is contained in:
parent
8882c6b6fd
commit
b5caa8fa35
|
@ -1121,9 +1121,10 @@ public class ConversationActivity extends XmppActivity
|
||||||
updateConversationList();
|
updateConversationList();
|
||||||
|
|
||||||
if (mPendingConferenceInvite != null) {
|
if (mPendingConferenceInvite != null) {
|
||||||
mPendingConferenceInvite.execute(this);
|
if (mPendingConferenceInvite.execute(this)) {
|
||||||
mToast = Toast.makeText(this, R.string.creating_conference,Toast.LENGTH_LONG);
|
mToast = Toast.makeText(this, R.string.creating_conference, Toast.LENGTH_LONG);
|
||||||
mToast.show();
|
mToast.show();
|
||||||
|
}
|
||||||
mPendingConferenceInvite = null;
|
mPendingConferenceInvite = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -981,9 +981,10 @@ public abstract class XmppActivity extends Activity {
|
||||||
if (requestCode == REQUEST_INVITE_TO_CONVERSATION && resultCode == RESULT_OK) {
|
if (requestCode == REQUEST_INVITE_TO_CONVERSATION && resultCode == RESULT_OK) {
|
||||||
mPendingConferenceInvite = ConferenceInvite.parse(data);
|
mPendingConferenceInvite = ConferenceInvite.parse(data);
|
||||||
if (xmppConnectionServiceBound && mPendingConferenceInvite != null) {
|
if (xmppConnectionServiceBound && mPendingConferenceInvite != null) {
|
||||||
mPendingConferenceInvite.execute(this);
|
if (mPendingConferenceInvite.execute(this)) {
|
||||||
mToast = Toast.makeText(this, R.string.creating_conference,Toast.LENGTH_LONG);
|
mToast = Toast.makeText(this, R.string.creating_conference, Toast.LENGTH_LONG);
|
||||||
mToast.show();
|
mToast.show();
|
||||||
|
}
|
||||||
mPendingConferenceInvite = null;
|
mPendingConferenceInvite = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1218,19 +1219,21 @@ public abstract class XmppActivity extends Activity {
|
||||||
return invite;
|
return invite;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void execute(XmppActivity activity) {
|
public boolean execute(XmppActivity activity) {
|
||||||
XmppConnectionService service = activity.xmppConnectionService;
|
XmppConnectionService service = activity.xmppConnectionService;
|
||||||
Conversation conversation = service.findConversationByUuid(this.uuid);
|
Conversation conversation = service.findConversationByUuid(this.uuid);
|
||||||
if (conversation == null) {
|
if (conversation == null) {
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if (conversation.getMode() == Conversation.MODE_MULTI) {
|
if (conversation.getMode() == Conversation.MODE_MULTI) {
|
||||||
for (Jid jid : jids) {
|
for (Jid jid : jids) {
|
||||||
service.invite(conversation, jid);
|
service.invite(conversation, jid);
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
} else {
|
} else {
|
||||||
jids.add(conversation.getJid().toBareJid());
|
jids.add(conversation.getJid().toBareJid());
|
||||||
service.createAdhocConference(conversation.getAccount(), null, jids, activity.adhocCallback);
|
service.createAdhocConference(conversation.getAccount(), null, jids, activity.adhocCallback);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue