Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -580,18 +580,18 @@ public final class io/getstream/chat/android/compose/ui/attachments/content/Medi
public static final field $stable I
public final fun component1 ()Landroidx/activity/compose/ManagedActivityResultLauncher;
public final fun component2 ()Lio/getstream/chat/android/models/Message;
public final fun component3 ()I
public final fun component3 ()Ljava/lang/String;
public final fun component4 ()Z
public final fun component5 ()Lio/getstream/chat/android/ui/common/helper/DownloadAttachmentUriGenerator;
public final fun component6 ()Lio/getstream/chat/android/ui/common/helper/DownloadRequestInterceptor;
public final fun component7 ()Lio/getstream/chat/android/ui/common/images/resizing/StreamCdnImageResizing;
public final fun component8 ()Z
public fun equals (Ljava/lang/Object;)Z
public final fun getAttachmentPosition ()I
public final fun getDownloadAttachmentUriGenerator ()Lio/getstream/chat/android/ui/common/helper/DownloadAttachmentUriGenerator;
public final fun getDownloadRequestInterceptor ()Lio/getstream/chat/android/ui/common/helper/DownloadRequestInterceptor;
public final fun getMediaGalleryPreviewLauncher ()Landroidx/activity/compose/ManagedActivityResultLauncher;
public final fun getMessage ()Lio/getstream/chat/android/models/Message;
public final fun getSelectedAttachmentUrl ()Ljava/lang/String;
public final fun getSkipEnrichUrl ()Z
public final fun getStreamCdnImageResizing ()Lio/getstream/chat/android/ui/common/images/resizing/StreamCdnImageResizing;
public final fun getVideoThumbnailsEnabled ()Z
Expand Down Expand Up @@ -682,8 +682,8 @@ public final class io/getstream/chat/android/compose/ui/attachments/preview/Medi
}

public final class io/getstream/chat/android/compose/ui/attachments/preview/MediaGalleryPreviewActivity$Companion {
public final fun getIntent (Landroid/content/Context;Lio/getstream/chat/android/models/Message;IZLio/getstream/chat/android/ui/common/helper/DownloadAttachmentUriGenerator;Lio/getstream/chat/android/ui/common/helper/DownloadRequestInterceptor;Lio/getstream/chat/android/ui/common/images/resizing/StreamCdnImageResizing;ZLio/getstream/chat/android/compose/ui/theme/MediaGalleryConfig;)Landroid/content/Intent;
public static synthetic fun getIntent$default (Lio/getstream/chat/android/compose/ui/attachments/preview/MediaGalleryPreviewActivity$Companion;Landroid/content/Context;Lio/getstream/chat/android/models/Message;IZLio/getstream/chat/android/ui/common/helper/DownloadAttachmentUriGenerator;Lio/getstream/chat/android/ui/common/helper/DownloadRequestInterceptor;Lio/getstream/chat/android/ui/common/images/resizing/StreamCdnImageResizing;ZLio/getstream/chat/android/compose/ui/theme/MediaGalleryConfig;ILjava/lang/Object;)Landroid/content/Intent;
public final fun getIntent (Landroid/content/Context;Lio/getstream/chat/android/models/Message;Ljava/lang/String;ZLio/getstream/chat/android/ui/common/helper/DownloadAttachmentUriGenerator;Lio/getstream/chat/android/ui/common/helper/DownloadRequestInterceptor;Lio/getstream/chat/android/ui/common/images/resizing/StreamCdnImageResizing;ZLio/getstream/chat/android/compose/ui/theme/MediaGalleryConfig;)Landroid/content/Intent;
public static synthetic fun getIntent$default (Lio/getstream/chat/android/compose/ui/attachments/preview/MediaGalleryPreviewActivity$Companion;Landroid/content/Context;Lio/getstream/chat/android/models/Message;Ljava/lang/String;ZLio/getstream/chat/android/ui/common/helper/DownloadAttachmentUriGenerator;Lio/getstream/chat/android/ui/common/helper/DownloadRequestInterceptor;Lio/getstream/chat/android/ui/common/images/resizing/StreamCdnImageResizing;ZLio/getstream/chat/android/compose/ui/theme/MediaGalleryConfig;ILjava/lang/Object;)Landroid/content/Intent;
}

public final class io/getstream/chat/android/compose/ui/attachments/preview/MediaGalleryPreviewContract : androidx/activity/result/contract/ActivityResultContract {
Expand All @@ -699,20 +699,20 @@ public final class io/getstream/chat/android/compose/ui/attachments/preview/Medi

public final class io/getstream/chat/android/compose/ui/attachments/preview/MediaGalleryPreviewContract$Input {
public static final field $stable I
public fun <init> (Lio/getstream/chat/android/models/Message;IZLio/getstream/chat/android/ui/common/helper/DownloadAttachmentUriGenerator;Lio/getstream/chat/android/ui/common/helper/DownloadRequestInterceptor;Lio/getstream/chat/android/ui/common/images/resizing/StreamCdnImageResizing;Z)V
public synthetic fun <init> (Lio/getstream/chat/android/models/Message;IZLio/getstream/chat/android/ui/common/helper/DownloadAttachmentUriGenerator;Lio/getstream/chat/android/ui/common/helper/DownloadRequestInterceptor;Lio/getstream/chat/android/ui/common/images/resizing/StreamCdnImageResizing;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (Lio/getstream/chat/android/models/Message;Ljava/lang/String;ZLio/getstream/chat/android/ui/common/helper/DownloadAttachmentUriGenerator;Lio/getstream/chat/android/ui/common/helper/DownloadRequestInterceptor;Lio/getstream/chat/android/ui/common/images/resizing/StreamCdnImageResizing;Z)V
public synthetic fun <init> (Lio/getstream/chat/android/models/Message;Ljava/lang/String;ZLio/getstream/chat/android/ui/common/helper/DownloadAttachmentUriGenerator;Lio/getstream/chat/android/ui/common/helper/DownloadRequestInterceptor;Lio/getstream/chat/android/ui/common/images/resizing/StreamCdnImageResizing;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getDownloadAttachmentUriGenerator ()Lio/getstream/chat/android/ui/common/helper/DownloadAttachmentUriGenerator;
public final fun getDownloadRequestInterceptor ()Lio/getstream/chat/android/ui/common/helper/DownloadRequestInterceptor;
public final fun getInitialPosition ()I
public final fun getMessage ()Lio/getstream/chat/android/models/Message;
public final fun getSelectedAttachmentUrl ()Ljava/lang/String;
public final fun getSkipEnrichUrl ()Z
public final fun getStreamCdnImageResizing ()Lio/getstream/chat/android/ui/common/images/resizing/StreamCdnImageResizing;
public final fun getVideoThumbnailsEnabled ()Z
}

public final class io/getstream/chat/android/compose/ui/attachments/preview/MediaGalleryPreviewScreenKt {
public static final fun MediaGalleryPreviewScreen (Lio/getstream/chat/android/compose/viewmodel/mediapreview/MediaGalleryPreviewViewModel;ILkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Modifier;Lio/getstream/chat/android/compose/ui/theme/MediaGalleryConfig;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function7;Lkotlin/jvm/functions/Function5;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;III)V
public static final fun MediaGalleryPreviewScreen (Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/ConnectionState;Lio/getstream/chat/android/models/User;ILio/getstream/chat/android/models/Attachment;ZZZLkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Modifier;Lio/getstream/chat/android/compose/ui/theme/MediaGalleryConfig;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function7;Lkotlin/jvm/functions/Function5;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;IIII)V
public static final fun MediaGalleryPreviewScreen (Lio/getstream/chat/android/compose/viewmodel/mediapreview/MediaGalleryPreviewViewModel;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Modifier;Lio/getstream/chat/android/compose/ui/theme/MediaGalleryConfig;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function7;Lkotlin/jvm/functions/Function5;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;III)V
public static final fun MediaGalleryPreviewScreen (Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/ConnectionState;Lio/getstream/chat/android/models/User;Ljava/lang/String;Lio/getstream/chat/android/models/Attachment;ZZZLkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Modifier;Lio/getstream/chat/android/compose/ui/theme/MediaGalleryConfig;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function7;Lkotlin/jvm/functions/Function5;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;IIII)V
}

public final class io/getstream/chat/android/compose/ui/attachments/preview/MediaPreviewActivity : androidx/appcompat/app/AppCompatActivity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ import io.getstream.chat.android.ui.common.helper.DownloadAttachmentUriGenerator
import io.getstream.chat.android.ui.common.helper.DownloadRequestInterceptor
import io.getstream.chat.android.ui.common.images.resizing.StreamCdnImageResizing
import io.getstream.chat.android.ui.common.utils.extensions.hasLink
import io.getstream.chat.android.ui.common.utils.extensions.imagePreviewUrl

/**
* Displays a preview of single or multiple video or attachments.
Expand Down Expand Up @@ -139,7 +140,7 @@ public fun MediaAttachmentContent(
onItemClick: (
mediaGalleryPreviewLauncher: ManagedActivityResultLauncher<Input, MediaGalleryPreviewResult?>,
message: Message,
attachmentPosition: Int,
selectedAttachmentUrl: String?,
videoThumbnailsEnabled: Boolean,
downloadAttachmentUriGenerator: DownloadAttachmentUriGenerator,
downloadRequestInterceptor: DownloadRequestInterceptor,
Expand All @@ -161,7 +162,7 @@ public fun MediaAttachmentContent(
onItemClick(
it.mediaGalleryPreviewLauncher,
it.message,
it.attachmentPosition,
it.selectedAttachmentUrl,
it.videoThumbnailsEnabled,
it.downloadAttachmentUriGenerator,
it.downloadRequestInterceptor,
Expand Down Expand Up @@ -198,7 +199,7 @@ public fun MediaAttachmentContent(
onMediaAttachmentContentItemClick(
it.mediaGalleryPreviewLauncher,
it.message,
it.attachmentPosition,
it.selectedAttachmentUrl,
it.videoThumbnailsEnabled,
it.downloadAttachmentUriGenerator,
it.downloadRequestInterceptor,
Expand Down Expand Up @@ -314,7 +315,6 @@ internal fun SingleMediaAttachment(
),
shape = if (shouldBeFullSize) null else RoundedCornerShape(StreamTokens.radiusLg),
message = message,
attachmentPosition = 0,
onMediaGalleryPreviewResult = onMediaGalleryPreviewResult,
onLongItemClick = onLongItemClick,
skipEnrichUrl = skipEnrichUrl,
Expand Down Expand Up @@ -380,7 +380,6 @@ internal fun RowScope.MultipleMediaAttachmentsColumns(
shape = shape,
message = message,
skipEnrichUrl = skipEnrichUrl,
attachmentPosition = positionInColumn,
onMediaGalleryPreviewResult = onMediaGalleryPreviewResult,
onLongItemClick = onLongItemClick,
onItemClick = onContentItemClick,
Expand Down Expand Up @@ -418,7 +417,6 @@ internal fun RowScope.MultipleMediaAttachmentsColumns(
shape = shape,
message = message,
skipEnrichUrl = skipEnrichUrl,
attachmentPosition = attachmentIndex,
forceShimmer = anyOverflowUploading,
onMediaGalleryPreviewResult = onMediaGalleryPreviewResult,
onLongItemClick = onLongItemClick,
Expand All @@ -440,7 +438,6 @@ internal fun RowScope.MultipleMediaAttachmentsColumns(
shape = shape,
message = message,
skipEnrichUrl = skipEnrichUrl,
attachmentPosition = attachmentIndex,
onMediaGalleryPreviewResult = onMediaGalleryPreviewResult,
onLongItemClick = onLongItemClick,
onItemClick = onContentItemClick,
Expand Down Expand Up @@ -474,9 +471,6 @@ private fun attachmentShape(
* Displays previews of image and video attachments.
*
* @param message The original message containing the attachments.
* @param attachmentPosition The position of the attachment in the list
* of attachments. Used to remember the item position when viewing it in a separate
* activity.
* @param attachment The attachment that is previewed.
* @param skipEnrichUrl Used by the media gallery. If set to true will skip enriching URLs when you update the message
* by deleting an attachment contained within it. Set to false by default.
Expand All @@ -494,7 +488,6 @@ private fun attachmentShape(
@Composable
internal fun MediaAttachmentContentItem(
message: Message,
attachmentPosition: Int,
attachment: Attachment,
skipEnrichUrl: Boolean,
shape: Shape?,
Expand Down Expand Up @@ -558,14 +551,14 @@ internal fun MediaAttachmentContentItem(
if (message.syncStatus == SyncStatus.COMPLETED) {
onItemClick(
MediaAttachmentClickData(
mixedMediaPreviewLauncher,
message,
attachmentPosition,
videoThumbnailsEnabled,
downloadAttachmentUriGenerator,
downloadRequestInterceptor,
streamCdnImageResizing,
skipEnrichUrl,
mediaGalleryPreviewLauncher = mixedMediaPreviewLauncher,
message = message,
selectedAttachmentUrl = attachment.imagePreviewUrl,
videoThumbnailsEnabled = videoThumbnailsEnabled,
downloadAttachmentUriGenerator = downloadAttachmentUriGenerator,
downloadRequestInterceptor = downloadRequestInterceptor,
streamCdnImageResizing = streamCdnImageResizing,
skipEnrichUrl = skipEnrichUrl,
),
)
} else {
Expand Down Expand Up @@ -696,7 +689,7 @@ internal fun MediaAttachmentShowMoreOverlay(
*
* @param mediaGalleryPreviewLauncher The [ManagedActivityResultLauncher] to launch the media gallery.
* @param message The message that holds the clicked attachment.
* @param attachmentPosition The position of the clicked attachment in the message's attachments list.
* @param selectedAttachmentUrl The preview URL of the clicked attachment.
* @param videoThumbnailsEnabled Whether video thumbnails are enabled.
* @param downloadAttachmentUriGenerator The [DownloadAttachmentUriGenerator] used to generate URIs for downloading
* attachments.
Expand All @@ -709,7 +702,7 @@ internal fun MediaAttachmentShowMoreOverlay(
public data class MediaAttachmentClickData internal constructor(
val mediaGalleryPreviewLauncher: ManagedActivityResultLauncher<Input, MediaGalleryPreviewResult?>,
val message: Message,
val attachmentPosition: Int,
val selectedAttachmentUrl: String?,
val videoThumbnailsEnabled: Boolean,
val downloadAttachmentUriGenerator: DownloadAttachmentUriGenerator,
val downloadRequestInterceptor: DownloadRequestInterceptor,
Expand Down Expand Up @@ -746,7 +739,7 @@ private const val EqualDimensionsRatio = 1f
* @param mediaGalleryPreviewLauncher The launcher used for launching the media gallery after
* clicking on an attachment.
* @param message The message which contains the attachment.
* @param attachmentPosition The position (inside the message) of the attachment being clicked on.
* @param selectedAttachmentUrl The preview URL of the attachment being clicked on.
* @param skipEnrichUrl Whether the URL should skip being enriched, i.e. rendered as
* a link attachment. Used when updating the message from the gallery by doing actions
* such as deleting an attachment.
Expand All @@ -755,7 +748,7 @@ private const val EqualDimensionsRatio = 1f
internal fun onMediaAttachmentContentItemClick(
mediaGalleryPreviewLauncher: ManagedActivityResultLauncher<Input, MediaGalleryPreviewResult?>,
message: Message,
attachmentPosition: Int,
selectedAttachmentUrl: String?,
videoThumbnailsEnabled: Boolean,
downloadAttachmentUriGenerator: DownloadAttachmentUriGenerator,
downloadRequestInterceptor: DownloadRequestInterceptor,
Expand All @@ -765,7 +758,7 @@ internal fun onMediaAttachmentContentItemClick(
mediaGalleryPreviewLauncher.launch(
Input(
message = message,
initialPosition = attachmentPosition,
selectedAttachmentUrl = selectedAttachmentUrl,
videoThumbnailsEnabled = videoThumbnailsEnabled,
downloadAttachmentUriGenerator = downloadAttachmentUriGenerator,
downloadRequestInterceptor = downloadRequestInterceptor,
Expand Down
Loading
Loading