diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/StartConversationActivity.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java index c04db44aa..a46c2a6c3 100644 --- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java @@ -227,7 +227,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU } 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() { @@ -318,8 +318,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU if (this.mTheme != theme) { recreate(); } else { - Intent i = getIntent(); - if (i == null || !i.hasExtra(WelcomeActivity.EXTRA_INVITE_URI)) { + if (pendingViewIntent.peek() == null) { askForContactsPermissions(); } } @@ -739,7 +738,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); if (inviteUri != null) { Invite invite = new Invite(inviteUri); |