Package-level declarations

Types

Link copied to clipboard
sealed interface HistoryIntent : MviIntent

Defines the HistoryIntent contract for the SDAI presentation layer.

Link copied to clipboard
data class HistoryState(val loading: Boolean = true, val items: List<AiGenerationResult> = emptyList(), val error: String? = null) : MviState

Carries HistoryState data through the SDAI presentation layer.

Link copied to clipboard
data class HistoryStrings(val title: String = Localization.string("title_gallery"), val empty: String = Localization.string("gallery_empty_title"), val refresh: String = Localization.string("action_update"), val imageUnavailable: String = Localization.string("message_image_unavailable"), val resultMeta: (AiGenerationResult) -> String = { item -> Localization.string( "history_result_meta", item.width, item.height, item.samplingSteps, item.cfgScale, ) })

Carries HistoryStrings data through the SDAI presentation layer.

Link copied to clipboard
class HistoryViewModel(val dispatchersProvider: DispatchersProvider, val getAllGalleryUseCase: GetAllGalleryUseCase, val router: HistoryRouter, val onError: (Throwable) -> Unit = {}) : BaseMviViewModel<HistoryState, HistoryIntent, EmptyEffect>

Coordinates HistoryViewModel behavior in the SDAI presentation layer.

Properties

Link copied to clipboard

Exposes the AiGenerationResult value used by the SDAI presentation layer.

Functions

Link copied to clipboard
private fun HistoryError(message: String, strings: HistoryStrings, processIntent: (HistoryIntent) -> Unit)

Renders the HistoryError UI for the SDAI presentation layer.

Link copied to clipboard

Renders the HistoryItem UI for the SDAI presentation layer.

Link copied to clipboard
fun HistoryScreenContent(state: HistoryState, processIntent: (HistoryIntent) -> Unit, modifier: Modifier = Modifier, strings: HistoryStrings = HistoryStrings())

Renders the HistoryScreenContent UI for the SDAI presentation layer.