Connect View Model

class ConnectViewModel(snackbarHostState: SnackbarHostState) : EquinoxViewModel

The ConnectViewModel class is the support class used by the ConnectScreen to execute the authentication requests to the backend

Author

N7ghtm4r3 - Tecknobit

Parameters

snackbarHostState

: the host to launch the snackbar messages

See also

EquinoxViewModel
ViewModel
FetcherManagerWrapper

Constructors

Link copied to clipboard
constructor(snackbarHostState: SnackbarHostState)

Properties

Link copied to clipboard
lateinit var email: MutableState<String>

email -> the email of the user

Link copied to clipboard
lateinit var emailError: MutableState<Boolean>

emailError -> whether the email field is not valid

Link copied to clipboard
lateinit var host: MutableState<String>

host -> the value of the host to reach

Link copied to clipboard
lateinit var hostError: MutableState<Boolean>

hostError -> whether the host field is not valid

Link copied to clipboard
lateinit var isSignUp: MutableState<Boolean>

isSignUp -> whether the auth request to execute is sign up or sign in

Link copied to clipboard
lateinit var name: MutableState<String>

name -> the name of the user

Link copied to clipboard
lateinit var nameError: MutableState<Boolean>

nameError -> whether the name field is not valid

Link copied to clipboard
lateinit var password: MutableState<String>

password -> the password of the user

Link copied to clipboard
lateinit var passwordError: MutableState<Boolean>

passwordError -> whether the password field is not valid

Link copied to clipboard
lateinit var serverSecret: MutableState<String>

serverSecret -> the value of the server secret

Link copied to clipboard
lateinit var serverSecretError: MutableState<Boolean>

serverSecretError -> whether the serverSecret field is not valid

Link copied to clipboard
lateinit var surname: MutableState<String>

surname -> the surname of the user

Link copied to clipboard
lateinit var surnameError: MutableState<Boolean>

surnameError -> whether the surname field is not valid

Link copied to clipboard
lateinit var tagName: MutableState<String>

tagName -> the tag name of the user

Link copied to clipboard
lateinit var tagNameError: MutableState<Boolean>

nameError -> whether the tagName field is not valid

Functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
fun auth()

Wrapper function to execute the specific authentication request

Link copied to clipboard
open override fun canRefresherStart(): Boolean
Link copied to clipboard
open override fun continueToFetch(currentContext: Class<*>): Boolean
Link copied to clipboard
open override fun execRefreshingRoutine(currentContext: Class<*>, routine: () -> Unit, repeatRoutine: Boolean, refreshDelay: Long)
Link copied to clipboard
Link copied to clipboard
open override fun restartRefresher()
Link copied to clipboard
open fun setActiveContext(currentContext: Class<*>)
Link copied to clipboard
open override fun suspendRefresher()
Link copied to clipboard
fun SuspendUntilElementOnScreen(elementVisible: MutableState<Boolean>)