Open
Description
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