CreateGroupScreenViewModel

The CreateGroupScreenViewModel provides the methods for the creation or the editing of a com.tecknobit.pandoro.ui.screens.groups.data.Group item

Author

N7ghtm4r3 - Tecknobit

Parameters

groupId

The identifier of the group to edit

See also

EquinoxViewModel

Constructors

Link copied to clipboard
constructor(groupId: String?)

Properties

Link copied to clipboard
val candidateMembersState: PaginationState<Int, GroupMember>

candidateMembersState -> the state used to manage the pagination for the loadCandidateMembers method

Link copied to clipboard

candidateProjects -> the list of the candidates projects to share in the group

Link copied to clipboard
Link copied to clipboard
val group: StateFlow<Group?>
Link copied to clipboard

groupDescription -> the value of the description of the group

Link copied to clipboard

groupDescriptionError -> whether the groupDescription field is not valid

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

groupLogo -> the value of the logo of the group

Link copied to clipboard
var groupLogoPayload: PlatformFile?

groupLogoPayload -> the payload of the group logo to set

Link copied to clipboard

groupMembers -> the list of the current members in the group

Link copied to clipboard

groupName -> the value of the name of the group

Link copied to clipboard

groupNameError -> whether the groupName field is not valid

Link copied to clipboard

groupProjects -> the list of the current projects shared in the group

Link copied to clipboard
Link copied to clipboard

userProjects -> the list of the projects owned by the com.tecknobit.pandoro.localUser

Functions

Link copied to clipboard
expect open fun addCloseable(closeable: AutoCloseable)
expect fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard

Method to set the availability of the candidates member

Link copied to clipboard
open override fun canRetrieverStart(): Boolean
Link copied to clipboard
open override fun continueToRetrieve(currentContext: KClass<*>): Boolean
Link copied to clipboard
fun countCandidatesMember(membersEdited: Int = 0)

Method to count the total amount of the candidates members

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

Method to manage a candidate project in the groupProjects and candidateProjects lists

Link copied to clipboard

Method to set the no-availability of the candidates member

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

Method to retrieve the data of a Group if needed

Link copied to clipboard

Method to retrieve the current projects owned by the com.tecknobit.pandoro.localUser

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)
Link copied to clipboard

Method to create or editing the group invoking the correct method to execute the request to handle that operation