OverlayConfigViewModel

class OverlayConfigViewModel @Inject constructor(overlayConfigDao: OverlayConfigDao, paddingTemplateDao: PaddingTemplateDao, keyRepository: KeyRepository, context: Context) : ViewModel

ViewModel exposing overlay per-app configs, padding templates, keys and the installed-app list, and persisting configuration changes.

Constructors

Link copied to clipboard
@Inject
constructor(overlayConfigDao: OverlayConfigDao, paddingTemplateDao: PaddingTemplateDao, keyRepository: KeyRepository, context: Context)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val keys: StateFlow<List<KeySummary>>
Link copied to clipboard

Functions

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

Removes the overlay config for the given caller packageName.

Link copied to clipboard

Loads the installed-app list once, no-op if already loaded.

Link copied to clipboard
Link copied to clipboard

Loads and sorts user-installed (plus messenger) apps off the main thread.

Link copied to clipboard

Inserts or updates the per-app overlay config entity.