DocumentModel

Model that loads documents from a DocumentStore and keeps them updated.

This model exposes a StateFlow of all documents as DocumentInfo and listens to live updates from the store. If a Document has no card art the model creates a default card art using Branding.renderFallbackCardArt. The model also maintains a persistent order of documents and applications can call e.g. setDocumentPosition to change the order.

Use DocumentModel.create to create an instance.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

A list of DocumentInfo for the documents in documentStore.

Functions

Link copied to clipboard
suspend fun setDocumentPosition(documentInfo: DocumentInfo, position: Int)

Sets the position of a document.