ProjectScreenViewModel

The ProjectScreenViewModel provides the methods to display and operate on a com.tecknobit.pandoro.ui.screens.projects.data.Project item

Author

N7ghtm4r3 - Tecknobit

Parameters

projectId

The identifier of the group to display

See also

Constructors

Link copied to clipboard
constructor(projectId: String)

Properties

Link copied to clipboard
val project: StateFlow<Project?>
Link copied to clipboard
open override val requestsScope: CoroutineScope

requestsScope -> coroutine used to send the requests to the backend

Link copied to clipboard
Link copied to clipboard
lateinit var updateStatusesFilters: SnapshotStateList<UpdateStatus>

updateStatusesFilters -> the statuses of The update to use as filters

Functions

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

Method to check whether the updateStatusesFilters are set

Link copied to clipboard

Method to arrange The updates list applying the filters

Link copied to clipboard
open override fun canRetrieverStart(): Boolean
Link copied to clipboard

Method to clear the filters and set it as the default

Link copied to clipboard
open override fun continueToRetrieve(currentContext: KClass<*>): Boolean
Link copied to clipboard
open override fun deleteNote(update: ProjectUpdate?, note: Note, onDelete: () -> Unit)

Method to delete a note

Link copied to clipboard
open fun deleteProject(project: Project, onDelete: () -> Unit, onFailure: (JsonObject) -> Unit)

Method to delete a project

Link copied to clipboard
fun deleteUpdate(update: ProjectUpdate, onDelete: () -> Unit)

Method to delete an update

Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
Link copied to clipboard
open override fun manageNoteStatus(update: ProjectUpdate?, note: Note)

Method to manage the status of the note

Link copied to clipboard
fun manageStatusesFilter(updateStatus: UpdateStatus, selected: Boolean)

Method to manage the values in the updateStatusesFilters list

Link copied to clipboard

Method to publish an update, so set its status on UpdateStatus.PUBLISHED

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

Method to retrieve the data of a Project

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

Method to start an update, so set its status on UpdateStatus.IN_DEVELOPMENT

Link copied to clipboard
open override fun suspendRetriever()
Link copied to clipboard
open fun suspendRetrieverIf(condition: Boolean)