CreateNoteScreenViewModel

class CreateNoteScreenViewModel(projectId: String?, updateId: String?, noteId: String?) : EquinoxViewModel

The CreateNoteScreenViewModel provides the methods for the creation or the editing of a com.tecknobit.pandoro.ui.screens.notes.data.Note item

Author

N7ghtm4r3 - Tecknobit

Parameters

projectId

The identifier of the project owns the update

updateId

The identifier of the update owns the note

noteId

The identifier of the note to edit

See also

EquinoxViewModel

Constructors

Link copied to clipboard
constructor(projectId: String?, updateId: String?, noteId: String?)

Properties

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

content -> state holds the content of the note

Link copied to clipboard
val note: StateFlow<Note?>
Link copied to clipboard

Functions

Link copied to clipboard
expect open fun addCloseable(closeable: AutoCloseable)
expect fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
open override fun canRetrieverStart(): Boolean
Link copied to clipboard
open override fun continueToRetrieve(currentContext: KClass<*>): Boolean
Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
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

Method to retrieve the data of a Note

Link copied to clipboard
fun saveNote()

Method to save the content inserted

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
open override fun suspendRetriever()
Link copied to clipboard
open fun suspendRetrieverIf(condition: Boolean)