show escaped jids when it comes to account selection
This commit is contained in:
parent
df3273a6fc
commit
3ca10b8fa9
|
@ -79,7 +79,7 @@ public class BlocklistActivity extends AbstractSearchableListItemActivity implem
|
|||
getString(R.string.block_jabber_id),
|
||||
getString(R.string.block),
|
||||
null,
|
||||
account.getJid().asBareJid().toString(),
|
||||
account.getJid().asBareJid().toEscapedString(),
|
||||
true,
|
||||
false
|
||||
);
|
||||
|
|
|
@ -263,7 +263,7 @@ public class ChannelDiscoveryActivity extends XmppActivity implements MenuItem.O
|
|||
}
|
||||
|
||||
public void joinChannelSearchResult(String selectedAccount, Room result) {
|
||||
final Jid jid = Config.DOMAIN_LOCK == null ? Jid.of(selectedAccount) : Jid.of(selectedAccount, Config.DOMAIN_LOCK, null);
|
||||
final Jid jid = Config.DOMAIN_LOCK == null ? Jid.ofEscaped(selectedAccount) : Jid.ofEscaped(selectedAccount, Config.DOMAIN_LOCK, null);
|
||||
final boolean syncAutoJoin = getBooleanPreference("autojoin", R.bool.autojoin);
|
||||
final Account account = xmppConnectionService.findAccountByJid(jid);
|
||||
final Conversation conversation = xmppConnectionService.findOrCreateConversation(account, result.getRoom(), true, true, true);
|
||||
|
|
|
@ -361,9 +361,9 @@ public class ChooseContactActivity extends AbstractSearchableListItemActivity im
|
|||
for (Account account : xmppConnectionService.getAccounts()) {
|
||||
if (account.getStatus() != Account.State.DISABLED) {
|
||||
if (Config.DOMAIN_LOCK != null) {
|
||||
this.mActivatedAccounts.add(account.getJid().getLocal());
|
||||
this.mActivatedAccounts.add(account.getJid().getEscapedLocal());
|
||||
} else {
|
||||
this.mActivatedAccounts.add(account.getJid().asBareJid().toString());
|
||||
this.mActivatedAccounts.add(account.getJid().asBareJid().toEscapedString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -146,9 +146,9 @@ public class EnterJidDialog extends DialogFragment implements OnBackendConnected
|
|||
}
|
||||
try {
|
||||
if (Config.DOMAIN_LOCK != null) {
|
||||
accountJid = Jid.of((String) binding.account.getSelectedItem(), Config.DOMAIN_LOCK, null);
|
||||
accountJid = Jid.ofEscaped((String) binding.account.getSelectedItem(), Config.DOMAIN_LOCK, null);
|
||||
} else {
|
||||
accountJid = Jid.of((String) binding.account.getSelectedItem());
|
||||
accountJid = Jid.ofEscaped((String) binding.account.getSelectedItem());
|
||||
}
|
||||
} catch (final IllegalArgumentException e) {
|
||||
return;
|
||||
|
|
|
@ -577,9 +577,9 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
|
|||
Jid jid;
|
||||
try {
|
||||
if (Config.DOMAIN_LOCK != null) {
|
||||
jid = Jid.of((String) spinner.getSelectedItem(), Config.DOMAIN_LOCK, null);
|
||||
jid = Jid.ofEscaped((String) spinner.getSelectedItem(), Config.DOMAIN_LOCK, null);
|
||||
} else {
|
||||
jid = Jid.of((String) spinner.getSelectedItem());
|
||||
jid = Jid.ofEscaped((String) spinner.getSelectedItem());
|
||||
}
|
||||
} catch (final IllegalArgumentException e) {
|
||||
return null;
|
||||
|
|
|
@ -39,9 +39,9 @@ public class AccountUtils {
|
|||
for (Account account : service.getAccounts()) {
|
||||
if (account.getStatus() != Account.State.DISABLED) {
|
||||
if (Config.DOMAIN_LOCK != null) {
|
||||
accounts.add(account.getJid().getLocal());
|
||||
accounts.add(account.getJid().toEscapedString());
|
||||
} else {
|
||||
accounts.add(account.getJid().asBareJid().toString());
|
||||
accounts.add(account.getJid().asBareJid().toEscapedString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue