UsageState

data class UsageState(val loading: Boolean = false, val items: List<UsageItem> = emptyList(), val selectedCategory: UsageCategory? = null)(source)

Shared immutable state consumed by the donut chart and category list.

Author

Dmitriy Moroz

Parameters

loading

True while the screen should show shimmer placeholders instead of stale data.

items

Ordered categories visible on the current usage screen.

selectedCategory

Category currently highlighted in the donut, or null to show total.

Constructors

Link copied to clipboard
constructor(loading: Boolean = false, items: List<UsageItem> = emptyList(), selectedCategory: UsageCategory? = null)

Properties

Link copied to clipboard

Ordered categories visible on the current usage screen.

Link copied to clipboard

True while the screen should show shimmer placeholders instead of stale data.

Link copied to clipboard

Category currently highlighted in the donut, or null to show total.

Link copied to clipboard

Selected item if it still exists and remains non-empty.

Link copied to clipboard

Sum of all visible positive category byte counts.

Functions

Link copied to clipboard
Link copied to clipboard