Search in sources :

Example 1 with AuthEmailPayload

use of org.wordpress.android.fluxc.store.AccountStore.AuthEmailPayload in project WordPress-Login-Flow-Android by wordpress-mobile.

the class LoginMagicLinkRequestFragment method dispatchMagicLinkRequest.

private void dispatchMagicLinkRequest() {
    if (mLoginListener != null) {
        if (NetworkUtils.checkConnection(getActivity())) {
            showMagicLinkRequestProgressDialog();
            AuthEmailPayloadSource source = getAuthEmailPayloadSource();
            AuthEmailPayload authEmailPayload = new AuthEmailPayload(mEmail, false, mIsJetpackConnect ? AccountStore.AuthEmailPayloadFlow.JETPACK : null, source, mMagicLinkScheme);
            mDispatcher.dispatch(AuthenticationActionBuilder.newSendAuthEmailAction(authEmailPayload));
        }
    }
}
Also used : AuthEmailPayloadSource(org.wordpress.android.fluxc.store.AccountStore.AuthEmailPayloadSource) AuthEmailPayload(org.wordpress.android.fluxc.store.AccountStore.AuthEmailPayload)

Example 2 with AuthEmailPayload

use of org.wordpress.android.fluxc.store.AccountStore.AuthEmailPayload in project WordPress-Login-Flow-Android by wordpress-mobile.

the class SignupMagicLinkFragment method sendMagicLinkEmail.

protected void sendMagicLinkEmail() {
    if (NetworkUtils.checkConnection(getActivity())) {
        startProgress(getString(R.string.signup_magic_link_progress));
        AuthEmailPayloadSource source = getAuthEmailPayloadSource();
        AuthEmailPayload authEmailPayload = new AuthEmailPayload(mEmail, true, mIsJetpackConnect ? AuthEmailPayloadFlow.JETPACK : null, source);
        authEmailPayload.signupFlowName = SIGNUP_FLOW_NAME;
        mDispatcher.dispatch(AuthenticationActionBuilder.newSendAuthEmailAction(authEmailPayload));
    }
}
Also used : AuthEmailPayloadSource(org.wordpress.android.fluxc.store.AccountStore.AuthEmailPayloadSource) AuthEmailPayload(org.wordpress.android.fluxc.store.AccountStore.AuthEmailPayload)

Aggregations

AuthEmailPayload (org.wordpress.android.fluxc.store.AccountStore.AuthEmailPayload)2 AuthEmailPayloadSource (org.wordpress.android.fluxc.store.AccountStore.AuthEmailPayloadSource)2