Package-level declarations

Types

Link copied to clipboard
fun interface ClipboardHandler

Abstraction over the ClipboardHandlerImpl that allows users to copy messages.

Link copied to clipboard
class ClipboardHandlerImpl(clipboardManager: ClipboardManager, autoTranslationEnabled: Boolean = false, getCurrentUser: () -> User? = { null }) : ClipboardHandler

A simple implementation that relies on the clipboardManager to copy messages.

Link copied to clipboard
class DownloadPermissionHandler(permissionState: PermissionState, context: Context, onPermissionRequired: () -> Unit = { if (!context.wasPermissionRequested(permissionState.permission) || permissionState.status.shouldShowRationale) { permissionState.launchPermissionRequest() } else { context.openSystemSettings() } }, onPermissionGranted: (Map<String, Any>) -> Unit = { payload -> (payload[PayloadAttachment] as? Attachment)?.let { ChatClient .instance() .downloadAttachment(context, it) .enqueue() } }) : PermissionHandler

Default implementation of the download permission handler. By default will request the user to enable the permission and once it has been granted will download the attachment.

Link copied to clipboard

Interface for implementing custom permission handlers.

Functions

Link copied to clipboard
fun LoadMoreHandler(listState: LazyListState, loadMoreThreshold: Int = 3, loadMore: () -> Unit)

Handler to be used with LazyColumn to implement infinite scroll.