Package-level declarations

Types

Link copied to clipboard
internal class AndroidGalleryPlatformActions(val context: Context, val fileProviderDescriptor: FileProviderDescriptor) : GalleryPlatformActions

Coordinates AndroidGalleryPlatformActions behavior in the SDAI presentation layer.

Link copied to clipboard
sealed interface GalleryDialog

Defines the GalleryDialog contract for the SDAI presentation layer.

Link copied to clipboard
sealed interface GalleryEffect : MviEffect

Defines the GalleryEffect contract for the SDAI presentation layer.

Link copied to clipboard
class GalleryExporter(val fileProviderDescriptor: FileProviderDescriptor, val getGalleryItemsUseCase: GetGalleryItemsUseCase, val getAllGalleryUseCase: GetAllGalleryUseCase, val base64ToBitmapConverter: Base64ToBitmapConverter) : GalleryExportService, FileSavableExporter.BmpToFile, FileSavableExporter.FilesToZip

Coordinates GalleryExporter behavior in the SDAI presentation layer.

Link copied to clipboard
data class GalleryExportResult(val filePath: String)

Carries GalleryExportResult data through the SDAI presentation layer.

Link copied to clipboard

Defines the GalleryExportService contract for the SDAI presentation layer.

Link copied to clipboard
data class GalleryGridItemUi(val id: Long, val image: ImageBitmap?, val hidden: Boolean)

Carries GalleryGridItemUi data through the SDAI presentation layer.

Link copied to clipboard
sealed interface GalleryIntent : MviIntent

Defines the GalleryIntent contract for the SDAI presentation layer.

Link copied to clipboard
private data class GalleryPageSnapshot(val limit: Int, val items: List<GalleryGridItemUi>, val totalCount: Int)

Carries GalleryPageSnapshot data through the SDAI presentation layer.

Link copied to clipboard

Defines the GalleryPlatformActions contract for the SDAI presentation layer.

Link copied to clipboard
data class GalleryState(val loading: Boolean = true, val loadingNextPage: Boolean = false, val items: List<GalleryGridItemUi> = emptyList(), val nextPage: Int = 0, val canLoadMore: Boolean = true, val dialog: GalleryDialog = GalleryDialog.None, val mediaStoreInfo: MediaStoreInfo = MediaStoreInfo(), val dropdownMenuShow: Boolean = false, val selectionMode: Boolean = false, val selection: List<Long> = emptyList(), val grid: Grid = Grid.Fixed2) : MviState

Carries GalleryState data through the SDAI presentation layer.

Link copied to clipboard
class GalleryViewModel(val dispatchersProvider: DispatchersProvider, val getMediaStoreInfoUseCase: GetMediaStoreInfoUseCase, val backgroundWorkObserver: BackgroundWorkObserver, val preferenceManager: PreferenceManager, val deleteAllGalleryUseCase: DeleteAllGalleryUseCase, val deleteGalleryItemsUseCase: DeleteGalleryItemsUseCase, val getGenerationResultPagedUseCase: GetGenerationResultPagedUseCase, val galleryExportService: GalleryExportService, val galleryRouter: GalleryRouter, val onError: (Throwable) -> Unit = {}) : BaseMviViewModel<GalleryState, GalleryIntent, GalleryEffect>

Coordinates GalleryViewModel behavior in the SDAI presentation layer.

Link copied to clipboard

Provides the NoOpGalleryExportService singleton used by the SDAI presentation layer.

Link copied to clipboard

Provides the NoOpGalleryPlatformActions singleton used by the SDAI presentation layer.

Properties

Link copied to clipboard
private const val GALLERY_FIRST_PAGE: Int = 0

Exposes the GALLERY_FIRST_PAGE value used by the SDAI presentation layer.

Link copied to clipboard
private const val GALLERY_PAGE_SIZE: Int = 60

Exposes the GALLERY_PAGE_SIZE value used by the SDAI presentation layer.

Functions

Link copied to clipboard
internal fun DeleteGalleryDialog(titleKey: String, textKey: String, onConfirm: () -> Unit, onDismiss: () -> Unit)

Renders the DeleteGalleryDialog UI for the SDAI presentation layer.

Link copied to clipboard
internal actual fun GalleryBackHandler(enabled: Boolean, onBack: () -> Unit)

Renders the GalleryBackHandler UI for the SDAI presentation layer.

internal expect fun GalleryBackHandler(enabled: Boolean, onBack: () -> Unit)

Renders the GalleryBackHandler UI for the SDAI presentation layer.

internal actual fun GalleryBackHandler(enabled: Boolean, onBack: () -> Unit)

Renders the GalleryBackHandler UI for the SDAI presentation layer.

Link copied to clipboard
internal fun GalleryBottomBars(state: GalleryState, processIntent: (GalleryIntent) -> Unit)

Renders the GalleryBottomBars UI for the SDAI presentation layer.

Link copied to clipboard
internal fun GalleryDialogRenderer(dialog: GalleryDialog, processIntent: (GalleryIntent) -> Unit)

Renders the GalleryDialogRenderer UI for the SDAI presentation layer.

Link copied to clipboard
internal fun GalleryEmptyState(modifier: Modifier = Modifier)

Renders the GalleryEmptyState UI for the SDAI presentation layer.

Link copied to clipboard
internal fun GalleryLoadingGrid(modifier: Modifier, grid: Grid)

Renders the GalleryLoadingGrid UI for the SDAI presentation layer.

Link copied to clipboard
fun GalleryScreen(modifier: Modifier = Modifier, galleryRouter: GalleryRouter? = null, backHandlerEnabled: Boolean = true)

Renders the GalleryScreen UI for the SDAI presentation layer.

Link copied to clipboard
fun GalleryScreenContent(modifier: Modifier = Modifier, state: GalleryState, processIntent: (GalleryIntent) -> Unit = {})

Renders the GalleryScreenContent UI for the SDAI presentation layer.

Link copied to clipboard

Executes the galleryShimmerItems step in the SDAI presentation layer.

Link copied to clipboard
fun GalleryUiItem(modifier: Modifier = Modifier, item: GalleryGridItemUi, checked: Boolean = false, onClick: (GalleryGridItemUi) -> Unit = {}, onLongClick: () -> Unit = {}, onCheckedChange: (Boolean) -> Unit = {}, selectionMode: Boolean = false)

Renders the GalleryUiItem UI for the SDAI presentation layer.

Link copied to clipboard

Renders the GalleryUiItemShimmer UI for the SDAI presentation layer.

Link copied to clipboard
internal fun Modifier.selectionJiggle(enabled: Boolean, animationStartOffset: Int): Modifier

Renders the selectionJiggle UI for the SDAI presentation layer.