Team Screen View Model

class TeamScreenViewModel(snackbarHostState: SnackbarHostState, initialTeam: Team) : TeamViewModelHelper, RecompositionsLocker

The TeamActivityViewModel class is the support class used by TeamScreen to communicate with the backend and to execute the refreshing routines to update the UI data and working with the Team

Author

N7ghtm4r3 - Tecknobit

Parameters

snackbarHostState

: the host to launch the snackbar messages

initialTeam

: the initial value of the Team

See also

ViewModel
FetcherManager.FetcherManagerWrapper
EquinoxViewModel
RefyViewModel

Constructors

Link copied to clipboard
constructor(snackbarHostState: SnackbarHostState, initialTeam: Team)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val team: StateFlow<Team>

Functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
open override fun canRefresherStart(): Boolean
Link copied to clipboard
fun changeMemberRole(member: Team.RefyTeamMember, role: Team.RefyTeamMember.TeamRole, onSuccess: () -> Unit)

Function to execute the request to change the role of a member

Link copied to clipboard
open override fun continueToFetch(currentContext: Class<*>): Boolean
Link copied to clipboard
fun deleteTeam(team: Team, onSuccess: () -> Unit)

Function to execute the request to delete a team

Link copied to clipboard
open override fun execRefreshingRoutine(currentContext: Class<*>, routine: () -> Unit, repeatRoutine: Boolean, refreshDelay: Long)
Link copied to clipboard
Link copied to clipboard
open fun lastCanGoes(counter: Int): Boolean

Function to decree if the counter value reached the threshold of the LAST_CAN_GOES_VALUE

Link copied to clipboard
fun leaveTeam(team: Team, onSuccess: () -> Unit)

Function to execute the request to leave from a team

Link copied to clipboard
fun manageTeamCollections(team: Team, collections: List<String>, onSuccess: () -> Unit)

Function to execute the request to manage the collections of a team

Link copied to clipboard
fun manageTeamLinks(team: Team, links: List<String>, onSuccess: () -> Unit)

Function to execute the request to manage the links of a team

Link copied to clipboard

Function to execute the request to refresh the team displayed

Link copied to clipboard
fun removeCollectionFromTeam(collection: LinksCollection)

Function to execute the request to remove from the team a collection

Link copied to clipboard
fun removeLinkFromTeam(link: RefyLink)

Function to execute the request to remove from the team a link

Link copied to clipboard
fun removeMember(member: Team.RefyTeamMember)

Function to execute the request to remove a member from the team

Link copied to clipboard
open override fun reset()

Function to reset the counter to zero

Link copied to clipboard
open override fun restartRefresher()
Link copied to clipboard
open fun setActiveContext(currentContext: Class<*>)
Link copied to clipboard
fun setCurrentUserOwnedCollections(forceRefresh: Boolean = false)

Function to execute the request to fetch only the collections owned by the localUser, the collections fetched will be set to localUser.collections

Link copied to clipboard
fun setCurrentUserOwnedLinks(forceRefresh: Boolean = false)

Function to execute the request to fetch only the links owned by the localUser, the links fetched will be set to localUser.links

Link copied to clipboard
fun setCurrentUserOwnedTeams(forceRefresh: Boolean = false)

Function to execute the request to fetch only the teams owned by the localUser, the teams fetched will be set to localUser.teams

Link copied to clipboard
open override fun suspendRefresher()
Link copied to clipboard
fun SuspendUntilElementOnScreen(elementVisible: MutableState<Boolean>)