skip avatar ui when pep is not available. fixes #1706
This commit is contained in:
parent
df992d2566
commit
a2cb009f4c
|
@ -50,6 +50,7 @@ import eu.siacs.conversations.utils.CryptoHelper;
|
||||||
import eu.siacs.conversations.utils.UIHelper;
|
import eu.siacs.conversations.utils.UIHelper;
|
||||||
import eu.siacs.conversations.xml.Element;
|
import eu.siacs.conversations.xml.Element;
|
||||||
import eu.siacs.conversations.xmpp.OnKeyStatusUpdated;
|
import eu.siacs.conversations.xmpp.OnKeyStatusUpdated;
|
||||||
|
import eu.siacs.conversations.xmpp.XmppConnection;
|
||||||
import eu.siacs.conversations.xmpp.XmppConnection.Features;
|
import eu.siacs.conversations.xmpp.XmppConnection.Features;
|
||||||
import eu.siacs.conversations.xmpp.forms.Data;
|
import eu.siacs.conversations.xmpp.forms.Data;
|
||||||
import eu.siacs.conversations.xmpp.jid.InvalidJidException;
|
import eu.siacs.conversations.xmpp.jid.InvalidJidException;
|
||||||
|
@ -304,15 +305,14 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
final Intent intent;
|
final Intent intent;
|
||||||
if (avatar != null) {
|
final XmppConnection connection = mAccount.getXmppConnection();
|
||||||
intent = new Intent(getApplicationContext(),
|
if (avatar != null || (connection != null && !connection.getFeatures().pep())) {
|
||||||
StartConversationActivity.class);
|
intent = new Intent(getApplicationContext(), StartConversationActivity.class);
|
||||||
if (xmppConnectionService != null && xmppConnectionService.getAccounts().size() == 1) {
|
if (xmppConnectionService != null && xmppConnectionService.getAccounts().size() == 1) {
|
||||||
intent.putExtra("init", true);
|
intent.putExtra("init", true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
intent = new Intent(getApplicationContext(),
|
intent = new Intent(getApplicationContext(), PublishProfilePictureActivity.class);
|
||||||
PublishProfilePictureActivity.class);
|
|
||||||
intent.putExtra(EXTRA_ACCOUNT, mAccount.getJid().toBareJid().toString());
|
intent.putExtra(EXTRA_ACCOUNT, mAccount.getJid().toBareJid().toString());
|
||||||
intent.putExtra("setup", true);
|
intent.putExtra("setup", true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue