Session Screen View Model

class SessionScreenViewModel : EquinoxProfileViewModel

The SessionScreenViewModel class is the support class used to execute the requests related to the com.tecknobit.ametista.ui.screens.session.presenter.SessionScreen

Author

N7ghtm4r3 - Tecknobit

See also

EquinoxViewModel
EquinoxProfileViewModel
Retriever

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard

SessionScreenSection -> session sections available

Properties

Link copied to clipboard
lateinit var email: MutableState<String>
Link copied to clipboard
lateinit var language: MutableState<String>
Link copied to clipboard
val membersState: PaginationState<Int, AmetistaMember>

membersState -> the state used to manage the pagination for the loadMembers method

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

sessionScreenSection -> the container state to display the specific session section

Link copied to clipboard
Link copied to clipboard
lateinit var theme: MutableState<EquinoxLocalUser.ApplicationTheme>
Link copied to clipboard

viewerEmail -> the value of the email of the viewer

Link copied to clipboard

viewerEmailError -> whether the viewerEmail field is not valid

Link copied to clipboard

viewerName -> the value of the name of the viewer

Link copied to clipboard

viewerNameError -> whether the viewerName field is not valid

Link copied to clipboard

viewerSurname -> the value of the surname of the viewer

Link copied to clipboard

viewerSurnameError -> whether the viewerSurname field is not valid

Functions

Link copied to clipboard
expect open fun addCloseable(closeable: AutoCloseable)
expect fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
fun addViewer(onSuccess: () -> Unit)

Method to add a new com.tecknobit.ametistacore.models.AmetistaUser.Role.VIEWER in the system

Link copied to clipboard
open override fun canRetrieverStart(): Boolean
Link copied to clipboard
fun changeEmail(onSuccess: () -> Unit?, onFailure: (JsonObject) -> Unit)
Link copied to clipboard
fun changeLanguage(onSuccess: () -> Unit?, onFailure: (JsonObject) -> Unit)
Link copied to clipboard
fun changePassword(onSuccess: () -> Unit?, onFailure: (JsonObject) -> Unit)
Link copied to clipboard
fun changeProfilePic(profilePicName: String, profilePicBytes: ByteArray, onFailure: (JsonObject) -> Unit)
Link copied to clipboard
fun changeTheme(onChange: () -> Unit?)
Link copied to clipboard
fun clearSession(onClear: () -> Unit?)
Link copied to clipboard
open override fun continueToRetrieve(currentContext: KClass<*>): Boolean
Link copied to clipboard
fun deleteAccount(onDelete: () -> Unit?, onFailure: (JsonObject) -> Unit)
Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
Link copied to clipboard
fun logout(onLogout: () -> Unit)

Method to logout from the current session

Link copied to clipboard

Method to remove a member from the system

Link copied to clipboard
open override fun restartRetriever()
Link copied to clipboard
open fun restartRetrieverIf(condition: Boolean)
Link copied to clipboard
open override fun retrieve(currentContext: KClass<*>, routine: suspend () -> Unit, repeatRoutine: Boolean, refreshDelay: Long)
Link copied to clipboard
open fun setActiveContext(currentContext: KClass<*>)
Link copied to clipboard
fun showSnackbarMessage(response: JsonObject)
fun showSnackbarMessage(message: StringResource)
Link copied to clipboard
open override fun suspendRetriever()
Link copied to clipboard
open fun suspendRetrieverIf(condition: Boolean)