Project Screen View Model

class ProjectScreenViewModel(snackbarHostState: SnackbarHostState)

The ProjectScreenViewModel class is the support class used by the ProjectScreen to execute the requests to refresh and work on a project

Author

N7ghtm4r3 - Tecknobit

Parameters

snackbarHostState

: the host to launch the snackbar messages

See also

FetcherManagerWrapper
EquinoxViewModel

Constructors

Link copied to clipboard
constructor(snackbarHostState: SnackbarHostState)

Properties

Link copied to clipboard

addRelease -> state used to display the EquinoxAlertDialog to add a new release

Link copied to clipboard
val project: StateFlow<<Error class: unknown class>?>
Link copied to clipboard

releaseNotes -> the notes of the release

Link copied to clipboard

releaseNotesError -> whether the releaseNotes field is not valid

Link copied to clipboard
lateinit var releaseToEdit: MutableState<<Error class: unknown class>?>

releaseToEdit -> the release to edit, if requested

Link copied to clipboard

releaseVersion -> the version of the release

Link copied to clipboard

releaseVersionError -> whether the releaseVersion field is not valid

Functions

Link copied to clipboard
fun addRelease()

Function to add a new release to the current _project

Link copied to clipboard
fun editRelease(release: <Error class: unknown class>, releaseVersion: MutableState<String>, releaseVersionError: MutableState<Boolean>, releaseNotes: MutableState<String>, releaseNotesError: MutableState<Boolean>, onSuccess: () -> Unit)

Function to edit an exiting release

Link copied to clipboard
fun getProject(projectId: String)

Function to refresh the _project

Link copied to clipboard
fun markAsTester(member: <Error class: unknown class>, onSuccess: () -> Unit)

Function to execute the request to mark a member as NovaUser.Role.Tester

Link copied to clipboard
fun removeMember(member: <Error class: unknown class>)

Function to execute the request to remove a member

Link copied to clipboard
fun workOnProject(amITheProjectAuthor: Boolean, onSuccess: () -> Unit)

Function to execute the request to delete or leave the project