Package-level declarations

Types

Link copied to clipboard
private class AndroidSettingsPlatformActions(val context: Context, val launchStoragePermission: (Array<String>) -> Unit, val launchNotificationPermission: (String) -> Unit, val storagePermissionResult: MutableState<CompletableDeferred<Boolean>?>, val notificationPermissionResult: MutableState<CompletableDeferred<Boolean>?>) : SettingsPlatformActions

Coordinates AndroidSettingsPlatformActions behavior in the SDAI presentation layer.

Link copied to clipboard

Provides the IosSettingsPlatformActions singleton used by the SDAI presentation layer.

Link copied to clipboard

Provides the NoOpSettingsPlatformActions singleton used by the SDAI presentation layer.

Link copied to clipboard
private data class SdModelsRefreshKey(val source: ServerSource, val serverUrl: String, val demoMode: Boolean, val sdModel: String)

Carries SdModelsRefreshKey data through the SDAI presentation layer.

Link copied to clipboard
sealed interface SettingsIntent : MviIntent

Defines the SettingsIntent contract for the SDAI presentation layer.

Link copied to clipboard
sealed interface SettingsModal

Defines the SettingsModal contract for the SDAI presentation layer.

Link copied to clipboard

Defines the SettingsPlatformActions contract for the SDAI presentation layer.

Link copied to clipboard
data class SettingsState(val loading: Boolean = true, val onBoardingDemo: Boolean = false, val screenModal: SettingsModal = SettingsModal.None, val serverSource: ServerSource = ServerSource.AUTOMATIC1111, val sdModels: List<String> = emptyList(), val sdModelSelected: String = "", val stabilityAiCredits: Float = 0.0f, val localUseNNAPI: Boolean = false, val backgroundGenerationAvailable: Boolean = false, val backgroundGeneration: Boolean = false, val monitorConnectivity: Boolean = false, val autoSaveAiResults: Boolean = false, val saveToMediaStore: Boolean = false, val formAdvancedOptionsAlwaysShow: Boolean = false, val formPromptTaggedInput: Boolean = false, val useSystemColorPalette: Boolean = false, val useSystemDarkTheme: Boolean = false, val darkTheme: Boolean = false, val colorToken: ColorToken = ColorToken.MAUVE, val darkThemeToken: DarkThemeToken = DarkThemeToken.FRAPPE, val galleryGrid: Grid = Grid.Fixed2, val developerMode: Boolean = false, val appVersion: String = "") : MviState

Carries SettingsState data through the SDAI presentation layer.

Link copied to clipboard
class SettingsViewModel(dispatchersProvider: DispatchersProvider, getStableDiffusionModelsUseCase: GetStableDiffusionModelsUseCase, observeStabilityAiCreditsUseCase: ObserveStabilityAiCreditsUseCase, val selectStableDiffusionModelUseCase: SelectStableDiffusionModelUseCase, val clearAppCacheUseCase: ClearAppCacheUseCase, val preferenceManager: PreferenceManager, val debugMenuAccessor: DebugMenuAccessor, val buildInfoProvider: BuildInfoProvider, val linksProvider: LinksProvider, val router: SettingsRouter, val platformActions: SettingsPlatformActions, val onError: (Throwable) -> Unit = {}) : BaseMviViewModel<SettingsState, SettingsIntent, EmptyEffect>

Coordinates SettingsViewModel behavior in the SDAI presentation layer.

Functions

Link copied to clipboard
internal fun ContentSettingsState(modifier: Modifier = Modifier, state: SettingsState, processIntent: (SettingsIntent) -> Unit = {})

Renders the ContentSettingsState UI for the SDAI presentation layer.

Link copied to clipboard

Renders the rememberSettingsPlatformActions UI for the SDAI presentation layer.

Renders the rememberSettingsPlatformActions UI for the SDAI presentation layer.

Renders the rememberSettingsPlatformActions UI for the SDAI presentation layer.

Link copied to clipboard
internal fun SettingsCommunitySection(state: SettingsState, headerModifier: Modifier, itemModifier: Modifier, processIntent: (SettingsIntent) -> Unit)

Renders the SettingsCommunitySection UI for the SDAI presentation layer.

Link copied to clipboard
internal fun SettingsInfoSection(state: SettingsState, headerModifier: Modifier, itemModifier: Modifier, processIntent: (SettingsIntent) -> Unit)

Renders the SettingsInfoSection UI for the SDAI presentation layer.

Link copied to clipboard
internal fun SettingsLookAndFeelSection(state: SettingsState, isDark: Boolean, headerModifier: Modifier, itemModifier: Modifier, processIntent: (SettingsIntent) -> Unit)

Renders the SettingsLookAndFeelSection UI for the SDAI presentation layer.

Link copied to clipboard
internal fun SettingsModalRenderer(screenModal: SettingsModal, platformActions: SettingsPlatformActions, processIntent: (SettingsIntent) -> Unit)

Renders the SettingsModalRenderer UI for the SDAI presentation layer.

Link copied to clipboard
fun SettingsScreen(modifier: Modifier = Modifier, router: SettingsRouter? = null)

Renders the SettingsScreen UI for the SDAI presentation layer.

Link copied to clipboard
fun SettingsScreenContent(modifier: Modifier = Modifier, state: SettingsState, platformActions: SettingsPlatformActions = NoOpSettingsPlatformActions, processIntent: (SettingsIntent) -> Unit = {})

Renders the SettingsScreenContent UI for the SDAI presentation layer.

Link copied to clipboard
internal fun SettingsServerSection(state: SettingsState, headerModifier: Modifier, itemModifier: Modifier, warningModifier: Modifier, processIntent: (SettingsIntent) -> Unit)

Renders the SettingsServerSection UI for the SDAI presentation layer.

Link copied to clipboard
internal fun SettingsVersionFooter(state: SettingsState, processIntent: (SettingsIntent) -> Unit)

Renders the SettingsVersionFooter UI for the SDAI presentation layer.

Link copied to clipboard

Executes the shortTitle step in the SDAI presentation layer.

Link copied to clipboard
internal fun text(key: String): UiText

Executes the text step in the SDAI presentation layer.