fixed regression in StartConversationActivity that ignored welcome jid

This commit is contained in:
Daniel Gultsch 2018-03-30 15:57:44 +02:00
parent 2442dabb2a
commit e1a6ceb49b

View file

@ -225,7 +225,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
} }
private static boolean isViewIntent(final Intent i) { private static boolean isViewIntent(final Intent i) {
return i != null && (Intent.ACTION_VIEW.equals(i.getAction()) || Intent.ACTION_SENDTO.equals(i.getAction())); return i != null && (Intent.ACTION_VIEW.equals(i.getAction()) || Intent.ACTION_SENDTO.equals(i.getAction()) || i.hasExtra(WelcomeActivity.EXTRA_INVITE_URI));
} }
protected void hideToast() { protected void hideToast() {
@ -316,8 +316,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
if (this.mTheme != theme) { if (this.mTheme != theme) {
recreate(); recreate();
} else { } else {
Intent i = getIntent(); if (pendingViewIntent.peek() == null) {
if (i == null || !i.hasExtra(WelcomeActivity.EXTRA_INVITE_URI)) {
askForContactsPermissions(); askForContactsPermissions();
} }
} }
@ -729,7 +728,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
} }
} }
protected boolean processViewIntent(Intent intent) { protected boolean processViewIntent(@NonNull Intent intent) {
final String inviteUri = intent.getStringExtra(WelcomeActivity.EXTRA_INVITE_URI); final String inviteUri = intent.getStringExtra(WelcomeActivity.EXTRA_INVITE_URI);
if (inviteUri != null) { if (inviteUri != null) {
Invite invite = new Invite(inviteUri); Invite invite = new Invite(inviteUri);