GroupScreenViewModel

The GroupScreenViewModel provides the methods to display and operate on a com.tecknobit.pandoro.ui.screens.groups.data.Group item

Author

N7ghtm4r3 - Tecknobit

Parameters

groupId

The identifier of the group to display

See also

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

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

Link copied to clipboard

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

Link copied to clipboard

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

Functions

Link copied to clipboard

Method to add new members to the group

Link copied to clipboard

Method to set the availability of the candidates member

Link copied to clipboard
fun changeMemberRole(member: GroupMember, role: <Error class: unknown class>, onChange: () -> Unit)

Method to change the role of a member

Link copied to clipboard
fun countCandidatesMember(membersEdited: Int = 0)

Method to count the total amount of the candidates members

Link copied to clipboard
open fun deleteGroup(group: Group, onDelete: () -> Unit, onFailure: (JsonObject) -> Unit)

Method to delete a group

Link copied to clipboard

Method to edit the current projects (owned by the com.tecknobit.pandoro.localUser) shared with the group

Link copied to clipboard

Method to leave from the group

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

Method to remove a member from the group

Link copied to clipboard
open override fun retrieveGroup()

Method to retrieve the data of a Group

Link copied to clipboard

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