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
lateinit var currency: MutableState<NeutronCurrency>

profilePic -> the profile picture of the user

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
Link copied to clipboard
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 changeCurrency(onChange: () -> Unit)

Method to execute the currency change

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
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)