aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-03-22 19:40:08 +0100
committerChristian Schneppe <christian@pix-art.de>2018-03-22 19:40:08 +0100
commit899f8b618569925921eebba108e6a62acfaf3e9c (patch)
treeeef9cd3de52e3c995f64cdb657823503903fc026 /src
parent94d0e13ba78d9cd57525e4c7909f8e9d95a6093a (diff)
make account chooser visible for group chats
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/ui/StartConversationActivity.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
index 8ee4bab96..540673242 100644
--- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
@@ -473,6 +473,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.join_conference);
final View dialogView = getLayoutInflater().inflate(R.layout.join_conference_dialog, null);
+ final TextView yourAccount = dialogView.findViewById(R.id.your_account);
final Spinner spinner = dialogView.findViewById(R.id.account);
final AutoCompleteTextView jid = dialogView.findViewById(R.id.jid);
final TextView jabberIdDesc = dialogView.findViewById(R.id.jabber_id);
@@ -482,6 +483,13 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
if (prefilledJid != null) {
jid.append(prefilledJid);
}
+ if (xmppConnectionService.multipleAccounts()) {
+ yourAccount.setVisibility(View.VISIBLE);
+ spinner.setVisibility(View.VISIBLE);
+ } else {
+ yourAccount.setVisibility(View.GONE);
+ spinner.setVisibility(View.GONE);
+ }
populateAccountSpinner(this, mActivatedAccounts, spinner);
final Checkable bookmarkCheckBox = (CheckBox) dialogView
.findViewById(R.id.bookmark);
@@ -545,9 +553,17 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.create_conference);
final View dialogView = getLayoutInflater().inflate(R.layout.create_conference_dialog, null);
+ final TextView yourAccount = dialogView.findViewById(R.id.your_account);
final Spinner spinner = dialogView.findViewById(R.id.account);
final EditText subject = dialogView.findViewById(R.id.subject);
populateAccountSpinner(this, mActivatedAccounts, spinner);
+ if (xmppConnectionService.multipleAccounts()) {
+ yourAccount.setVisibility(View.VISIBLE);
+ spinner.setVisibility(View.VISIBLE);
+ } else {
+ yourAccount.setVisibility(View.GONE);
+ spinner.setVisibility(View.GONE);
+ }
builder.setView(dialogView);
builder.setPositiveButton(R.string.choose_participants, new OnClickListener() {
@Override