ui / com.schibsted.account.ui.login.screen.verification / VerificationPresenter

VerificationPresenter

class VerificationPresenter : VerificationContract.Presenter

Following the MVP design pattern this interface represent the implementation of the VerificationContract.Presenter. this class executes the code verification business logic and ask for UI updates depending on results.

Constructors

<init>

VerificationPresenter(verificationView: VerificationContract.View, provider: InputProvider<VerificationCode>)

Following the MVP design pattern this interface represent the implementation of the VerificationContract.Presenter. this class executes the code verification business logic and ask for UI updates depending on results.

Functions

resendCode

fun resendCode(passwordlessController: PasswordlessController): Unit

Used to resend a code verification to the identifier. It will ask the view to show an error if any failure or to show a pop-up in case of success

verifyCode

fun verifyCode(codeInputView: CodeInputView, keepMeLoggedIn: Boolean): Unit

Used to verify if the code provided by the user is valid If there is an agreement update a navigation to com.schibsted.account.ui.login.screen.term.TermsFragment will be asked. If the verification is successful a navigation to com.schibsted.account.ui.login.screen.information.RequiredFieldsFragment will be asked. If there is a failure the view will be requested to show an error