ProfileScreenViewModel

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.RetrieverWrapper
EquinoxViewModel
EquinoxProfileViewModel

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val changelogsState: PaginationState<Int, Changelog>

changelogsState -> the state used to manage the pagination for the retrieveChangelogs method

Link copied to clipboard
lateinit var email: 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
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
lateinit var theme: MutableState<EquinoxLocalUser.ApplicationTheme>

Functions

Link copied to clipboard
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 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 declineInvite(changelog: Changelog)
Link copied to clipboard
fun deleteAccount(onDelete: () -> Unit?, onFailure: (JsonObject) -> Unit)
Link copied to clipboard
fun deleteChangelog(changelog: Changelog)

Method to delete a changelog

Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
Link copied to clipboard
fun readChangelog(changelog: Changelog)

Method to read a changelog

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)