Release Screen View Model

class ReleaseScreenViewModel(snackbarHostState: SnackbarHostState)

The ReleaseScreenViewModel class is the support class used by the ReleaseScreen to execute the requests to refresh and work on a release

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
lateinit var assetsToUpload: SnapshotStateList<<Error class: unknown class>>

assetsToUpload -> the assets selected for the download

Link copied to clipboard
val closeAction: () -> Unit

closeAction -> action to invoke when the dialog to approve or reject the assets has been closed

Link copied to clipboard

commentAsset -> whether the assets has been commented

Link copied to clipboard

isApproved -> whether the assets has been approved

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

reasons -> the reasons of a rejection of the assets

Link copied to clipboard

reasonsError -> whether the reasons field is not valid

Link copied to clipboard

rejectedTagDescription -> the description for a rejection tag

Link copied to clipboard

rejectedTagDescriptionError -> whether the rejectedTagDescription field is not valid

Link copied to clipboard
lateinit var rejectedTags: SnapshotStateList<<Error class: unknown class>>

rejectedTags -> the rejection tags selected

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

requestedToDownload -> whether the user requested to download the test assets

Link copied to clipboard

requestedToUpload -> whether the user requested to upload new assets

Link copied to clipboard

uploadingAssetsComment -> the comment about the assets that have to be uploaded

Link copied to clipboard

uploadingAssetsCommentError -> whether the uploadingAssetsComment field is not valid

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

uploadingStatus -> status about the uploading

Link copied to clipboard

waitingAssetsManagement -> whether the requestedToUpload or requestedToDownload have been triggered

Functions

Link copied to clipboard
fun commentAssetsUploaded(projectId: String, releaseId: String, event: <Error class: unknown class>)

Function to execute the request to comment assets uploaded in an event

Link copied to clipboard
fun createAndDownloadReport(projectId: String, releaseId: String)

Function to execute the request to create a report for the current _release

Link copied to clipboard
fun deleteRelease(projectId: String, releaseId: String, onSuccess: () -> Unit)

Function to execute the request to delete the current _release

Link copied to clipboard
fun downloadTestAssets(assetsUploaded: List<<Error class: unknown class>>, onSuccess: () -> Unit = {})

Function to download the test assets

Link copied to clipboard
fun fillRejectedTag(projectId: String, releaseId: String, event: <Error class: unknown class>, tag: <Error class: unknown class>, onSuccess: () -> Unit)

Function to execute the request to fill a ReleaseTag of a release rejection

Link copied to clipboard
fun getRelease(projectId: String, releaseId: String)

Function to refresh the _release

Link copied to clipboard
fun promoteRelease(projectId: String, releaseId: String, newStatus: <Error class: unknown class>, onResponse: () -> Unit)

Function to execute the promote the current relase

Link copied to clipboard

Function to reset the instance used during the downloadTestAssets phase

Link copied to clipboard

Function to reset the instance used during the uploadAssets phase

Link copied to clipboard
fun uploadAssets(projectId: String, releaseId: String)

Function to upload new asset for a _release