SettingsViewModel

class SettingsViewModel(val ctx: Context, val network: NetworkObserver) : ViewModel

This is mostly an utility view model to not bloat the SettingsScreen All params are injected automatically with Koin

Constructors

Link copied to clipboard
constructor(ctx: Context, network: NetworkObserver)

Properties

Link copied to clipboard
private val ctx: Context
Link copied to clipboard
private val impl: ViewModelImpl?
Link copied to clipboard
Link copied to clipboard
private lateinit var prefs: UserPreferences
Link copied to clipboard
private lateinit var secrePrefs: UserSecretPreferences

Functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
fun <T> ViewModel.async(useMainDispatcher: Boolean = false, start: CoroutineStart = CoroutineStart.DEFAULT, block: suspend CoroutineScope.() -> T): Deferred<T>
Link copied to clipboard
internal fun clear()
Link copied to clipboard
Link copied to clipboard
fun getUserPrefs(): Deferred<UserPreferences>
Link copied to clipboard
Link copied to clipboard
fun ViewModel.launch(useMainDispatcher: Boolean = false, start: CoroutineStart = CoroutineStart.DEFAULT, block: suspend CoroutineScope.() -> Unit): Job
Link copied to clipboard
protected open fun onCleared()
Link copied to clipboard
Link copied to clipboard