~singpolyma/cheogram-android

4c04210bab52af4cad9f65c205fc2e63cb9821f1 — Stephen Paul Weber 11 months ago 1c4d1f3
Don't jump straight in, since the conversation list is safe now

And don't switch unconditionally, since we want you to be able to start a new
flow from a link/button even if you still have the last page open from before.
M src/main/java/eu/siacs/conversations/ui/ConversationFragment.java => src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +1 -3
@@ 3001,9 3001,7 @@ public class ConversationFragment extends XmppFragment
                    if (discoJid != null) commandJid = discoJid;
                }
                if (node != null && commandJid != null) {
                    if (!conversation.switchToSession(node)) {
                        conversation.startCommand(commandFor(commandJid, node), activity.xmppConnectionService);
                    }
                    conversation.startCommand(commandFor(commandJid, node), activity.xmppConnectionService);
                }
            });
            return;

M src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java => src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java +0 -5
@@ 200,11 200,6 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
            return false;
        }

        if (xmppConnectionService.isOnboarding() && xmppConnectionService.getConversations().size() < 2 && mRedirectInProcess.compareAndSet(false, true)) {
            startCommand(xmppConnectionService.getAccounts().get(0), Jid.of("cheogram.com/CHEOGRAM%jabber:iq:register"), "jabber:iq:register");
            return mRedirectInProcess.get();
        }

        boolean isConversationsListEmpty = xmppConnectionService.isConversationsListEmpty(ignore);
        if (isConversationsListEmpty && mRedirectInProcess.compareAndSet(false, true)) {
            final Intent intent = SignupUtils.getRedirectionIntent(this);