Edit in GitHubLog an issue

InboxUIState

Sealed interface representing different states for the Inbox UI.

States

Loading

Indicates that the inbox is currently fetching content from the device cache.

Copied to your clipboard
object Loading : InboxUIState

Success

Indicates that the inbox content was loaded successfully. Contains the inbox template and list of content cards.

Copied to your clipboard
data class Success(
val template: InboxTemplate,
val items: List<AepUI<*, *>>
) : InboxUIState

Properties

PropertyTypeDescription
template
The properties to be used for rendering the inbox (heading, layout, capacity, etc.).
items
List<AepUI<*, *>>
List of AepUI elements representing content cards to display in the inbox.

Error

Indicates that an error occurred while loading inbox content.

Copied to your clipboard
data class Error(
val error: Throwable
) : InboxUIState

Properties

PropertyTypeDescription
error
Throwable
The throwable that caused the error.

Usage Example

Copied to your clipboard
val inboxUIState by viewModel.inboxUIState.collectAsStateWithLifecycle()
when (inboxUIState) {
is InboxUIState.Loading -> {
// Show loading indicator
}
is InboxUIState.Success -> {
val successState = inboxUIState as InboxUIState.Success
val cardCount = successState.items.size
val heading = successState.template.heading
// Render inbox with cards
}
is InboxUIState.Error -> {
val errorState = inboxUIState as InboxUIState.Error
// Show error message: errorState.error.message
}
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2026 Adobe. All rights reserved.