Refy Screen View Model

abstract class RefyScreenViewModel : EquinoxViewModel, SessionStateFlowConsumer

The RefyScreenViewModel class is the support class used to handle the operations of a com.tecknobit.refy.ui.shared.presenters.RefyScreen, for example the requests to the backend

Author

N7ghtm4r3 - Tecknobit

See also

Retriever
EquinoxViewModel

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

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

keywords the keywords used as filter

Link copied to clipboard
open lateinit override var sessionFlowState: SessionFlowState

sessionFlowState the state used to manage the session lifecycle in the screen

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
Link copied to clipboard
abstract fun performOnServerOffline()

Routine to perform when the server is currently offline

Link copied to clipboard
abstract fun refresh()

Method used to refresh the data displayed by the screen

Link copied to clipboard
abstract fun reload()

Method used to reload the content related to data to retrieve that gone on error during the retrieving

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 fun setActiveContext(currentContext: KClass<*>)
Link copied to clipboard
fun showSnackbarMessage(message: String, actionLabel: String?, onDismiss: () -> Unit?, onActionPerformed: () -> Unit?, withDismissAction: Boolean, duration: SnackbarDuration)
fun showSnackbarMessage(response: JsonObject, actionLabel: String?, onDismiss: () -> Unit?, onActionPerformed: () -> Unit?, withDismissAction: Boolean, duration: SnackbarDuration)
fun showSnackbarMessage(message: StringResource, actionLabel: StringResource?, onDismiss: () -> Unit?, onActionPerformed: () -> Unit?, withDismissAction: Boolean, duration: SnackbarDuration)
Link copied to clipboard
open override fun suspendRetriever()
Link copied to clipboard
open fun suspendRetrieverIf(condition: Boolean)