Upsert Team Screen View Model

The UpsertTeamScreenViewModel class is the support class used by the com.tecknobit.refy.ui.screens.upsertteam.presenter.UpsertTeamScreen

Author

N7ghtm4r3 - Tecknobit

Parameters

teamId

The identifier of the item to update

See also

Retriever
EquinoxViewModel
SessionStateFlowConsumer

Constructors

Link copied to clipboard
constructor(teamId: String?)

Properties

Link copied to clipboard
val item: StateFlow<Team?>
Link copied to clipboard

itemDescription the description of the item

Link copied to clipboard

itemDescriptionError whether the itemDescription field is not valid

Link copied to clipboard
lateinit var logoPic: MutableState<String?>

logoPic the logo of the team

Link copied to clipboard

logoPicError whether the logoPic field is not valid

Link copied to clipboard
val potentialMembers: PaginationState<Int, TeamMember>

potentialMembers the state used to handle the pagination of the potential members to add in the team list

Link copied to clipboard
open lateinit override var sessionFlowState: SessionFlowState

sessionFlowState the state used to manage the session lifecycle in the screen

Link copied to clipboard
Link copied to clipboard

teamMembers the members of the team

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

teamName the name of the team

Link copied to clipboard

teamNameError whether the teamName 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
open override fun canRetrieverStart(): Boolean
Link copied to clipboard
open override fun continueToRetrieve(currentContext: KClass<*>): Boolean
Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
Link copied to clipboard
Link copied to clipboard
open override fun performOnServerOffline()

Routine to perform when the server is currently offline

Link copied to clipboard
fun pickTeamLogo(logoAsset: PlatformFile?)

Method to pick the logo of the team

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 override fun retrieveItem()

Method to retrieve the information of the item to display

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)
Link copied to clipboard
fun upsert(onUpsertAction: () -> Unit)

Method to insert or update an item