Revenue Related Screen View Model

abstract class RevenueRelatedScreenViewModel : EquinoxViewModel

The RevenueRelatedScreenViewModel class is the support class used to help the screens which manage the revenue items

Author

N7ghtm4r3 - Tecknobit

See also

Retriever
EquinoxViewModel

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val hideBalances: StateFlow<Boolean>
Link copied to clipboard
val revenuePeriod: StateFlow<RevenuePeriod>
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
fun applyRevenuePeriodFilter(revenuePeriod: RevenuePeriod, afterSet: () -> Unit)

Method to apply the period filter to the revenues retrieving

Link copied to clipboard
open override fun canRetrieverStart(): Boolean
Link copied to clipboard
open override fun continueToRetrieve(currentContext: KClass<*>): Boolean
Link copied to clipboard
fun deleteRevenue(revenue: Revenue, onDelete: () -> Unit)

Method to delete a revenue

Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
Link copied to clipboard

Method to manage the _hideBalances state

Link copied to clipboard
abstract fun notifyConnectionError()

Method to notify a connection error

Link copied to clipboard
abstract fun refreshData()

Method to refresh the data after a filter applying or a revenue deletion

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 information on the revenues and the wallet status after a connection error

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)