Package com.example.examer.viewmodels.profileScreenViewModel

Types

Link copied to clipboard
class ExamerProfileScreenViewModel(    application: Application,     repository: Repository,     authenticationService: AuthenticationService,     passwordManager: PasswordManager,     credentialsValidationUseCase: CredentialsValidationUseCase) : AndroidViewModel, ProfileScreenViewModel, CredentialsValidationUseCase
Link copied to clipboard
interface ProfileScreenViewModel

An interface that contains the required methods and properties for a concrete implementation of ProfileScreenViewModel.

Functions

Link copied to clipboard
fun ProfileScreenViewModel.updateEmail(newEmail: String, resetStateTimeOut: Long = defaultResetStateTimeOut)

A utility method that is used to update the email of the currently logged-in user with the newEmail. This extension method is a shorthand for the ProfileScreenViewModel.updateAttributeForCurrentUser. It removes the need for specifying the 'updateAttribute' param of the ProfileScreenViewModel.updateAttributeForCurrentUser method.

Link copied to clipboard
fun ProfileScreenViewModel.updateName(newName: String, resetStateTimeOut: Long = defaultResetStateTimeOut)

A utility method that is used to update the name of the currently logged-in user with the newName. This extension method is a shorthand for the ProfileScreenViewModel.updateAttributeForCurrentUser. It removes the need for specifying the 'updateAttribute' param of the ProfileScreenViewModel.updateAttributeForCurrentUser method.

Link copied to clipboard
fun ProfileScreenViewModel.updatePassword(newPassword: String, resetStateTimeOut: Long = defaultResetStateTimeOut)

A utility method that is used to update the password of the currently logged-in user with the newPassword. This extension method is a shorthand for the ProfileScreenViewModel.updateAttributeForCurrentUser. It removes the need for specifying the 'updateAttribute' param of the ProfileScreenViewModel.updateAttributeForCurrentUser method.

Properties

Link copied to clipboard
const val defaultResetStateTimeOut: Long