Skip to content

Commit

Permalink
Deprecate old AttachmentSelectionListener
Browse files Browse the repository at this point in the history
  • Loading branch information
JcMinarro committed Feb 27, 2024
1 parent 515d7f5 commit e980cc7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions DEPRECATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This document lists deprecated constructs in the SDK, with their expected time

| API / Feature | Deprecated (warning) | Deprecated (error) | Removed | Notes |
| --- | --- | --- | --- | --- |
| `AttachmentSelectionListener` | 2024.02.21 <br/>6.0.15 | 2024.03.21 ⌛ | 2024.04.21 ⌛ | Use `AttachmentsPickerDialogFragment.AttachmentsSelectionListener` instead. |
| `ImageAttachmentQuotedContent` | 2022.09.13 <br/>5.9.1 | 2022.09.27<br/>5.9.1 | 2023.08.29<br/>6.0.0 | Deprecated in favor of `MediaAttachmentQuotedContent`. The new function has the ability to preview videos as well as images. |
| `StreamDimens` constructor containing parameter `attachmentsContentImageGridSpacing` | 2022.09.13 <br/>5.9.1 | 2022.09.27<br/>5.9.1 | 2023.08.29<br/>6.0.0 | This constructor has been deprecated. Use the constructor that does not contain the parameter `attachmentsContentImageGridSpacing`. |
| `ImageAttachmentContent` | 2022.09.13 <br/>5.9.1 | 2022.09.27<br/>5.9.1 | 2023.08.29<br/>6.0.0 | `ImageAttachmentContent` has been deprecated in favor of `MediattachmentContent`. The new function is able to preview videos as well as images and has access to a new and improved media gallery. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ package io.getstream.chat.android.ui.feature.messages.composer.attachment.picker

import io.getstream.chat.android.ui.common.state.messages.composer.AttachmentMetaData

@Suppress("MaxLineLength")
@Deprecated(
message = "Use the new [AttachmentsPickerDialogFragment.AttachmentsSelectionListener] interface instead",
level = DeprecationLevel.WARNING,
replaceWith = ReplaceWith(
"AttachmentsPickerDialogFragment.AttachmentsSelectionListener",
"io.getstream.chat.android.ui.feature.messages.composer.attachment.picker.AttachmentsPickerDialogFragment.AttachmentsSelectionListener",
),
)
public fun interface AttachmentSelectionListener {
/**
* Called when attachment picking has been completed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,15 @@ public class AttachmentsPickerDialogFragment : BottomSheetDialogFragment() {
/**
* Sets the listener that will be notified when picking attachments has been completed.
*/
@Suppress("MaxLineLength")
@Deprecated(
message = "Use the new [AttachmentsSelectionListener] interface instead",
level = DeprecationLevel.WARNING,
replaceWith = ReplaceWith(
"setAttachmentsSelectionListener(attachmentsSelectionListener)",
"io.getstream.chat.android.ui.feature.messages.composer.attachment.picker.AttachmentsPickerDialogFragment.AttachmentsSelectionListener",
),
)
public fun setAttachmentSelectionListener(attachmentSelectionListener: AttachmentSelectionListener) {
this.attachmentSelectionListener = attachmentSelectionListener
}
Expand Down

0 comments on commit e980cc7

Please sign in to comment.