PackState

sealed interface PackState(source)

Where a pack stands, as its store reports it.

Inheritors

Types

Link copied to clipboard
data class Downloading(val bytes: Long, val totalBytes: Long?) : PackState

Downloading; totalBytes is null when the store does not say.

Link copied to clipboard
data class Failed(val reason: PackFailure, val detail: String?) : PackState

The fetch stopped. detail is the store's own message, for logs.

Link copied to clipboard

Play only: Play does not recognise this install (a sideload); PlayPrompts.show asks the user.

Link copied to clipboard
data object NotDownloaded : PackState

Not on the device. AssetPacks.fetch downloads it.

Link copied to clipboard
data object Pending : PackState

Queued, or paused by the system.

Link copied to clipboard
data object Ready : PackState

On the device and verified; AssetPacks.readBytes reads it.

Link copied to clipboard
data object Transferring : PackState

Play only: unpacking after the download.

Link copied to clipboard

Play only: a large pack waits for Wi-Fi until the user agrees to mobile data (PlayPrompts.show).

Properties

Link copied to clipboard

True for the states PackSource.fetch returns on: nothing more happens without the user or a new fetch.