Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Про инициализацию обязательных параметров отметить #8

Open
Alex009 opened this issue Apr 1, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@Alex009
Copy link
Member

Alex009 commented Apr 1, 2021

class AuthFormSmsCodeViewModel(
    val eventsDispatcher: EventsDispatcher<EventsListener>,
    val exceptionHandler: ExceptionHandler,
    private val authRepository: AuthRepository,
    private val strings: Strings
) : ViewModel() {    
    private var phone: String = ""
    private var key: String = ""
    private var authType: AuthType = AuthType.SIGN_UP    

    fun setInitialAuthData(phone: String, key: String, authType: AuthType) {
        this.phone = phone
        this.key = key
        this.authType = authType
    }

bad code

class AuthFormSmsCodeViewModel(
    val eventsDispatcher: EventsDispatcher<EventsListener>,
    val exceptionHandler: ExceptionHandler,
    private val authRepository: AuthRepository,
    private val strings: Strings,
    private val phone: String,
    private val key: String,
    private val authType: AuthType
) : ViewModel() {    

}

good code

@Alex009 Alex009 added the documentation Improvements or additions to documentation label Apr 11, 2021
Alex009 added a commit that referenced this issue May 25, 2022
IceRock University #8 - data storage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant