Package-level declarations

Types

Link copied to clipboard
sealed interface ReportIntent : MviIntent

Defines the ReportIntent contract for the SDAI presentation layer.

Link copied to clipboard
data class ReportScreenContentState(val loading: Boolean = true, val imageBase64: String = "", val text: String = "", val reason: ReportReason = ReportReason.Other, val reportSent: Boolean = false)

Carries ReportScreenContentState data through the SDAI presentation layer.

Link copied to clipboard
data class ReportScreenStrings(val title: String, val done: String, val submit: String, val sent: String, val description: String, val backContentDescription: String, val sendContentDescription: String, val doneContentDescription: String, val imageContentDescription: String, val reasonInappropriateContent: String, val reasonViolence: String, val reasonHatefulSpeech: String, val reasonIntellectualProperty: String, val reasonAdultContent: String, val reasonOther: String)

Carries ReportScreenStrings data through the SDAI presentation layer.

Link copied to clipboard
data class ReportState(val loading: Boolean = true, val error: ErrorState = ErrorState.None, val imageBase64: String = "", val text: String = "", val reason: ReportReason = ReportReason.Other, val reportSent: Boolean = false) : MviState

Carries ReportState data through the SDAI presentation layer.

Link copied to clipboard
class ReportViewModel(val itemId: Long, val dispatchersProvider: DispatchersProvider, val sendReportUseCase: SendReportUseCase, val getGenerationResultUseCase: GetGenerationResultUseCase, val getLastResultFromCacheUseCase: GetLastResultFromCacheUseCase, val router: ReportRouter, val buildInfoProvider: BuildInfoProvider, val onError: (Throwable) -> Unit = {}) : BaseMviViewModel<ReportState, ReportIntent, EmptyEffect>

Coordinates ReportViewModel behavior in the SDAI presentation layer.

Functions

Link copied to clipboard

Executes the label step in the SDAI presentation layer.

Link copied to clipboard
private fun ReportLoadedContent(state: ReportScreenContentState, strings: ReportScreenStrings, onTextChange: (String) -> Unit, onReasonChange: (ReportReason) -> Unit)

Renders the ReportLoadedContent UI for the SDAI presentation layer.

Link copied to clipboard
fun ReportScreen(itemId: Long, modifier: Modifier = Modifier, router: ReportRouter? = null)

Renders the ReportScreen UI for the SDAI presentation layer.

Link copied to clipboard
fun ReportScreenContent(state: ReportScreenContentState, strings: ReportScreenStrings, onNavigateBack: () -> Unit, onSubmit: () -> Unit, onTextChange: (String) -> Unit, onReasonChange: (ReportReason) -> Unit, modifier: Modifier = Modifier)

Renders the ReportScreenContent UI for the SDAI presentation layer.

Link copied to clipboard

Renders the reportScreenStrings UI for the SDAI presentation layer.

Link copied to clipboard

Converts SDAI data with toContentState.