diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-02-14 20:45:23 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-02-14 20:45:23 +0100 |
commit | 8b3ca970caa286e7e7216d6753c0ddc8ec8c04c5 (patch) | |
tree | 908324d40011dd39bd1625c3393121143bca92ff /src/main/java/de/pixart/messenger/ui | |
parent | 7c49e47659897c80d7e1b5998c66a7caa97fedc6 (diff) |
fixed adhoc conference creation behaviour. properly show errors
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
3 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java index 6bcf9c631..8a1076ab5 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java @@ -547,6 +547,7 @@ public class ConversationActivity extends XmppActivity menuSecure.setVisible((Config.supportOpenPgp() || Config.supportOmemo()) && Config.multipleEncryptionChoices()); //only if pgp is supported we have a choice } else { menuSecure.setVisible(Config.multipleEncryptionChoices()); + menuInviteContact.setVisible(xmppConnectionService != null && xmppConnectionService.findConferenceServer(getSelectedConversation().getAccount()) != null); } } } diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java index 2d24a27c9..a301a9127 100644 --- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java @@ -718,9 +718,10 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU } } if (account != null && jids.size() > 0) { - xmppConnectionService.createAdhocConference(account, subject, jids, mAdhocConferenceCallback); - mToast = Toast.makeText(this, R.string.creating_conference, Toast.LENGTH_LONG); - mToast.show(); + if (xmppConnectionService.createAdhocConference(account, subject, jids, mAdhocConferenceCallback)) { + mToast = Toast.makeText(this, R.string.creating_conference, Toast.LENGTH_LONG); + mToast.show(); + } } } } else { diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java index 31d976584..6f8e98002 100644 --- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java +++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java @@ -1150,8 +1150,7 @@ public abstract class XmppActivity extends Activity { return false; } else { jids.add(conversation.getJid().toBareJid()); - service.createAdhocConference(conversation.getAccount(), null, jids, activity.adhocCallback); - return true; + return service.createAdhocConference(conversation.getAccount(), null, jids, activity.adhocCallback); } } } |