Profile Screen View Model

class ProfileScreenViewModel : EquinoxProfileViewModel

The ProfileScreenViewModel class is the support class used to change the user account settings or preferences

Author

N7ghtm4r3 - Tecknobit

See also

Retriever
EquinoxViewModel
EquinoxProfileViewModel

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

closeApplicationOnLinkOpen Whether the user requires to close the application when a link has been opened.

Link copied to clipboard
lateinit var email: MutableState<String>
Link copied to clipboard
lateinit var language: MutableState<String>
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

newTagName the value of the new tag name to set

Link copied to clipboard

newTagNameError whether the newTagName field is not valid

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

tagName the tag name of the user

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

Functions

Link copied to clipboard
expect open fun addCloseable(closeable: AutoCloseable)
expect fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
open override fun canRetrieverStart(): Boolean
Link copied to clipboard
fun changeCloseOnLinkOpen(onChange: () -> Unit)

Method to change the closeApplicationOnLinkOpen requirement.

Link copied to clipboard
open fun changeEmail(onChange: () -> Unit?, onFailure: (JsonObject) -> Unit)
Link copied to clipboard
open fun changeLanguage(onChange: () -> Unit?, onFailure: (JsonObject) -> Unit)
Link copied to clipboard
open fun changePassword(onChange: () -> Unit?, onFailure: (JsonObject) -> Unit)
Link copied to clipboard
open fun changeProfilePic(profilePicName: String, profilePicBytes: ByteArray, onFailure: (JsonObject) -> Unit)
Link copied to clipboard
fun changeTagName(onSuccess: () -> Unit)

Method to change the tag name of the localUser

Link copied to clipboard
open fun changeTheme(onChange: () -> Unit?)
Link copied to clipboard
open fun clearSession(onClear: () -> Unit?)
Link copied to clipboard
open override fun continueToRetrieve(currentContext: KClass<*>): Boolean
Link copied to clipboard
open fun deleteAccount(onDelete: () -> Unit?, onFailure: (JsonObject) -> Unit)
Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
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(message: String, actionLabel: String?, onDismiss: () -> Unit?, onActionPerformed: () -> Unit?, withDismissAction: Boolean, duration: SnackbarDuration)
fun showSnackbarMessage(response: JsonObject, actionLabel: String?, onDismiss: () -> Unit?, onActionPerformed: () -> Unit?, withDismissAction: Boolean, duration: SnackbarDuration)
fun showSnackbarMessage(message: StringResource, actionLabel: StringResource?, onDismiss: () -> Unit?, onActionPerformed: () -> Unit?, withDismissAction: Boolean, duration: SnackbarDuration)
Link copied to clipboard
open override fun suspendRetriever()
Link copied to clipboard
open fun suspendRetrieverIf(condition: Boolean)