Skip to content

Commit

Permalink
Update DEPRECATIONS.md (#4937)
Browse files Browse the repository at this point in the history
* Update DEPRECATIONS.md

* suppress DEPRECATION_ERROR

* suppress DEPRECATION_ERROR

---------

Co-authored-by: kanat <>
  • Loading branch information
kanat authored Aug 29, 2023
1 parent 004bde7 commit eab381e
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 39 deletions.
57 changes: 32 additions & 25 deletions DEPRECATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,45 @@

This document lists deprecated constructs in the SDK, with their expected time ⌛ of further deprecations and removals.

//TODO: Replace 2022.11.?? with actual v6 release date

| API / Feature | Deprecated (warning) | Deprecated (error) | Removed | Notes |
| --- | --- | --- | --- | --- |
| `ImageAttachmentQuotedContent` | 2022.09.13 <br/>5.9.1 | 2022.09.27<br/>5.9.1 | 2022.11.??<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 | 2022.11.??<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 | 2022.11.??<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. |
| `ImageAttachmentFactory` | 2022.09.13 <br/>5.9.1 | 2022.09.27<br/>5.9.1 | 2022.11.??<br/>6.0.0 | `ImageAttachmentFactory` has been deprecated in favor of `MediaAttachmentFactory`. The new factory is able to preview videos as well as images and has access to a new and improved media gallery. |
| `ImagePreviewContract` | 2022.09.13 <br/>5.9.1 | 2022.09.27<br/>5.9.1 | 2022.11.??<br/>6.0.0 | `ImagePreviewContract` has been deprecated in favor of `MediaGalleryPreviewContract`, please use it in conjunction with `MediaGalleryPreviewActivity`. The new gallery holds multiple improvements such as the ability to reproduce mixed image and video content, automatic reloading upon regaining network connection and more. |
| `ImagePreviewActivity` | 2022.09.13 <br/>5.9.1 | 2022.09.27<br/>5.9.1 | 2022.11.??<br/>6.0.0 | This gallery activity has been deprecated in favour of `MediaGalleryPreviewContract`. The new gallery holds multiple improvements such as the ability to reproduce mixed image and video content, automatic reloading upon regaining network connection and more. |
| Lambda parameter `AttachmentState.onImagePreviewResult` | 2022.09.13 <br/>5.8.2 | 2022.11.??<br/>6.0.0 | 2022.11.??<br/>6.0.0 | Replace it with lambda parameter `AttachmentState.onMediaGalleryPreviewResult` |
| `AttachmentState` constructor containing parameter `onImagePreviewResult` | 2022.09.17 <br/>5.8.2 | 2022.11.??<br/>6.0.0 | 2022.11.??<br/>6.0.0 | This constructor has been deprecated. Use the constructor that does not contain the parameter `onImagePreviewResult`. |
| `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. |
| `ImageAttachmentFactory` | 2022.09.13 <br/>5.9.1 | 2022.09.27<br/>5.9.1 | 2023.08.29<br/>6.0.0 | `ImageAttachmentFactory` has been deprecated in favor of `MediaAttachmentFactory`. The new factory is able to preview videos as well as images and has access to a new and improved media gallery. |
| `ImagePreviewContract` | 2022.09.13 <br/>5.9.1 | 2022.09.27<br/>5.9.1 | 2023.08.29<br/>6.0.0 | `ImagePreviewContract` has been deprecated in favor of `MediaGalleryPreviewContract`, please use it in conjunction with `MediaGalleryPreviewActivity`. The new gallery holds multiple improvements such as the ability to reproduce mixed image and video content, automatic reloading upon regaining network connection and more. |
| `ImagePreviewActivity` | 2022.09.13 <br/>5.9.1 | 2022.09.27<br/>5.9.1 | 2023.08.29<br/>6.0.0 | This gallery activity has been deprecated in favour of `MediaGalleryPreviewContract`. The new gallery holds multiple improvements such as the ability to reproduce mixed image and video content, automatic reloading upon regaining network connection and more. |
| Lambda parameter `AttachmentState.onImagePreviewResult` | 2022.09.13 <br/>5.8.2 | 2023.08.29<br/>6.0.0 | 2023.08.29<br/>6.0.0 | Replace it with lambda parameter `AttachmentState.onMediaGalleryPreviewResult` |
| `AttachmentState` constructor containing parameter `onImagePreviewResult` | 2022.09.17 <br/>5.8.2 | 2023.08.29<br/>6.0.0 | 2023.08.29<br/>6.0.0 | This constructor has been deprecated. Use the constructor that does not contain the parameter `onImagePreviewResult`. |
| `ClientState.initialized` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2023.08.29<br/>6.0.0 | Use ClientState.initializationState instead. |
| `MessageListViewModel.BlockUser` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2023.08.29<br/>6.0.0 | Deprecated in order to make the action more explicit. Use `MessageListViewModel.ShadowBanUser` if you want to retain the same functionality, or `MessageListViewModel.BanUser` if you want to outright ban the user. The difference between banning and shadow banning can be found here: https://getstream.io/blog/feature-announcement-shadow-ban/ |
| `MessageAction.MuteUser` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2023.08.29<br/>6.0.0 | The option to mute users via a message option has been deprecated and will be removed. |
| `MessageListView::setUserUnmuteHandler` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2023.08.29<br/>6.0.0 | The option to unmute the user from `MessageListView` has been deprecated and will be removed. |
| `MessageListView::setUserMuteHandler` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2023.08.29<br/>6.0.0 | The option to mute the user from `MessageListView` has been deprecated and will be removed. |
| `MessageListView.UserUnmuteHandler` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2023.08.29<br/>6.0.0 | The option to unmute the user from `MessageListView` has been deprecated and will be removed. `UserUnmuteHandler` will be removed with it too. |
| `MessageListView.UserMuteHandler` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2023.08.29<br/>6.0.0 | The option to mute the user from `MessageListView` has been deprecated and will be removed. `UserMuteHandler` will be removed with it too. |
| `MessageListView::setMuteUserEnabled` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2023.08.29<br/>6.0.0 | The option to mute the user from `MessageListView` has been deprecated and will be removed. |
| `MessageListView.UserBlockHandler` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2023.08.29<br/>6.0.0 | The option to block the user from `MessageListView` has been deprecated and will be removed. `UserBlockHandler` will be removed with it too. |
| `MessageListView::setBlockUserEnabled` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2023.08.29<br/>6.0.0| The option to block the user from `MessageListView` has been deprecated and will be removed. |
| `MessageListView` attributes | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2023.08.29<br/>6.0.0 | The attributes `streamUiMuteOptionIcon`, `streamUiUnmuteOptionIcon`, `streamUiMuteUserEnabled`, `streamUiBlockOptionIcon` and `streamUiBlockUserEnabled` have been deprecated and will be removed. The options to block and mute users will no longer be contained inside `MessageListView` |
| `MessageListViewStyle` constructor containing params: `muteIcon`, `unmuteIcon`, `muteEnabled`, `blockIcon` and `blockEnabled` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2023.08.29<br/>6.0.0 | This constructor has been deprecated. Use the constructor that does not contain these parameters. |
| `StreamColors.ownMessagesBackground` | 2023.07.11 <br/>5.17.7 | 2023.08.29<br/>6.0.0 | 2023.10.11<br/> ⌛ | Use `MessageTheme.backgroundColor` instead. |
| `StreamColors.otherMessagesBackground` | 2023.07.11 <br/>5.17.7 | 2023.08.29<br/>6.0.0 | 2023.10.11<br/> ⌛ | Use `MessageTheme.backgroundColor` instead. |
| `StreamColors.deletedMessagesBackground` | 2023.07.11 <br/>5.17.7 | 2023.08.29<br/>6.0.0 | 2023.10.11<br/> ⌛ | Use `MessageTheme.deletedBackgroundColor` instead. |
| `StreamColors.ownMessageText` | 2023.07.11 <br/>5.17.7 | 2023.08.29<br/>6.0.0 | 2023.10.11<br/> ⌛ | Use `MessageTheme.textStyle.color` instead. |
| `StreamColors.otherMessageText` | 2023.07.11 <br/>5.17.7 | 2023.08.29<br/>6.0.0 | 2023.10.11<br/> ⌛ | Use `MessageTheme.textStyle.color` instead. |
| `StreamColors.ownMessageQuotedBackground` | 2023.07.11 <br/>5.17.7 | 2023.08.29<br/>6.0.0 | 2023.10.11<br/> ⌛ | Use `MessageTheme.quotedBackgroundColor` instead. |
| `StreamColors.otherMessageQuotedBackground` | 2023.07.11 <br/>5.17.7 | 2023.08.29<br/>6.0.0 | 2023.10.11<br/> ⌛ | Use `MessageTheme.quotedBackgroundColor` instead. |
| `StreamColors.ownMessageQuotedText` | 2023.07.11 <br/>5.17.7 | 2023.08.29<br/>6.0.0 | 2023.10.11<br/> ⌛ | Use `MessageTheme.quotedTextStyle.color` instead. |
| `StreamColors.otherMessageQuotedText` | 2023.07.11 <br/>5.17.7 | 2023.08.29<br/>6.0.0 | 2023.10.11<br/> ⌛ | Use `MessageTheme.quotedTextStyle.color` instead. |
| `StreamDimens` constructor containing parameter `attachmentsContentImageHeight` | 2022.08.16 <br/>5.8.0 | 2022.08.30<br/>5.9.0 | 2022.09.13<br/>5.10.0 | This constructor has been deprecated. Use the constructor that does not contain the parameter `attachmentsContentImageHeight`. |
| `QueryChannelsState.chatEventHandler` | 2022.08.16 <br/>5.8.0 | 2022.08.30<br/>5.9.0 | 2022.09.13<br/>5.10.0 | Use `QueryChannelsState.chatEventHandlerFactory` instead. |
| Multiple event specific `BaseChatEventHandler` methods | 2022.08.16 <br/>5.8.0 | 2022.08.30<br/>5.9.0 | 2022.09.13<br/>5.10.0 | Use `handleChatEvent()` or `handleCidEvent()` instead. |
| `NonMemberChatEventHandler` | 2022.08.16 <br/>5.8.0 | 2022.08.30<br/>5.9.0 | 2022.09.13<br/>5.10.0 | Use `BaseChatEventHandler` or `DefaultChatEventHandler` instead. |
| `ClientState.initialized` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2022.11.??<br/>6.0.0 | Use ClientState.initializationState instead. |
| `MessageListViewModel.BlockUser` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2022.11.??<br/>6.0.0 | Deprecated in order to make the action more explicit. Use `MessageListViewModel.ShadowBanUser` if you want to retain the same functionality, or `MessageListViewModel.BanUser` if you want to outright ban the user. The difference between banning and shadow banning can be found here: https://getstream.io/blog/feature-announcement-shadow-ban/ |
| `MessageAction.MuteUser` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2022.11.??<br/>6.0.0 | The option to mute users via a message option has been deprecated and will be removed. |
| `MessageListView::setUserUnmuteHandler` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2022.11.??<br/>6.0.0 | The option to unmute the user from `MessageListView` has been deprecated and will be removed. |
| `MessageListView::setUserMuteHandler` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2022.11.??<br/>6.0.0 | The option to mute the user from `MessageListView` has been deprecated and will be removed. |
| `MessageListView.UserUnmuteHandler` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2022.11.??<br/>6.0.0 | The option to unmute the user from `MessageListView` has been deprecated and will be removed. `UserUnmuteHandler` will be removed with it too. |
| `MessageListView.UserMuteHandler` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2022.11.??<br/>6.0.0 | The option to mute the user from `MessageListView` has been deprecated and will be removed. `UserMuteHandler` will be removed with it too. |
| `MessageListView::setMuteUserEnabled` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2022.11.??<br/>6.0.0 | The option to mute the user from `MessageListView` has been deprecated and will be removed. |
| `MessageListView.UserBlockHandler` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2022.11.??<br/>6.0.0 | The option to block the user from `MessageListView` has been deprecated and will be removed. `UserBlockHandler` will be removed with it too. |
| `MessageListView::setBlockUserEnabled` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2022.11.??<br/>6.0.0| The option to block the user from `MessageListView` has been deprecated and will be removed. |
| `MessageListView` attributes | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2022.11.??<br/>6.0.0 | The attributes `streamUiMuteOptionIcon`, `streamUiUnmuteOptionIcon`, `streamUiMuteUserEnabled`, `streamUiBlockOptionIcon` and `streamUiBlockUserEnabled` have been deprecated and will be removed. The options to block and mute users will no longer be contained inside `MessageListView` |
| `MessageListViewStyle` constructor containing params: `muteIcon`, `unmuteIcon`, `muteEnabled`, `blockIcon` and `blockEnabled` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2022.11.??<br/>6.0.0 | This constructor has been deprecated. Use the constructor that does not contain these parameters. |
| `DefaultTypingUpdatesBuffer` | 2022.08.02 <br/>5.7.0 | 2022.08.16<br/>5.8.0 | 2022.08.30<br/>5.9.0 | This implementation of `TypingUpdatesBuffer` has been deprecated and will be removed. Should you wish to user your own typing updates buffer, you should create a custom implementation of `TypingUpdatesBuffer`. |
| `ChannelListView.showLoadingMore()` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2022.11.??<br/>6.0.0 | Insert the loading item before passing the list to the adapter. |
| `ChannelListView.hideLoadingMore()` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2022.11.??<br/>6.0.0 | Insert the loading item before passing the list to the adapter. |
| `RowScope.DefaultComposerInputContent` | 2022.08.02<br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2022.11.??<br/>6.0.0 | Use `MessageInput` instead. |
| `ChannelListView.showLoadingMore()` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2023.08.29<br/>6.0.0 | Insert the loading item before passing the list to the adapter. |
| `ChannelListView.hideLoadingMore()` | 2022.08.02 <br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2023.08.29<br/>6.0.0 | Insert the loading item before passing the list to the adapter. |
| `RowScope.DefaultComposerInputContent` | 2022.08.02<br/>5.7.0 | 2022.09.13<br/>5.10.0 | 2023.08.29<br/>6.0.0 | Use `MessageInput` instead. |
| `LegacyDateFormatter` | 2022.08.02<br/>5.7.0 | 2022.08.16<br/>5.8.0 | 2022.08.30<br/>5.9.0 | The class is unused and will be removed. |
| `PorterImageView` | 2022.08.02<br/>5.7.0 | 2022.08.16<br/>5.8.0 | 2022.08.30<br/>5.9.0 | The class is unused and will be removed. |
| `PorterShapeImageView` | 2022.08.02<br/>5.7.0 | 2022.08.16<br/>5.8.0 | 2022.08.30<br/>5.9.0 | The class is unused and will be removed. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3061,11 +3061,6 @@ internal constructor(
}

@InternalStreamChatApi
@Deprecated(
message = "It shouldn't be used outside of SDK code. Created for testing purposes",
replaceWith = ReplaceWith("this.build()"),
level = DeprecationLevel.ERROR,
)
@SuppressWarnings("LongMethod")
override fun internalBuild(): ChatClient {
if (apiKey.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public data class MessageTheme(
): MessageTheme = defaultTheme(own = false, typography = typography, colors = colors)

@Composable
@Suppress("DEPRECATION_ERROR")
private fun defaultTheme(
own: Boolean,
typography: StreamTypography,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import io.getstream.chat.android.compose.R
* @param ownMessageQuotedText Changes the text color of the quoted message contained in a reply sent by the current user. [textHighEmphasis] by default.
* @param otherMessageQuotedText Changes the text color of the quoted message contained in a reply sent by other users. [textHighEmphasis] by default.
*/
@Suppress("DEPRECATION_ERROR")
@Immutable
public data class StreamColors(
public val textHighEmphasis: Color,
Expand All @@ -80,32 +81,32 @@ public data class StreamColors(
public val errorAccent: Color,
public val infoAccent: Color,
public val highlight: Color,
@Deprecated("Use MessageTheme.backgroundColor instead")
@Deprecated("Use MessageTheme.backgroundColor instead", level = DeprecationLevel.ERROR)
public val ownMessagesBackground: Color,
@Deprecated("Use MessageTheme.backgroundColor instead")
@Deprecated("Use MessageTheme.backgroundColor instead", level = DeprecationLevel.ERROR)
public val otherMessagesBackground: Color,
@Deprecated("Use MessageTheme.deletedBackgroundColor instead")
@Deprecated("Use MessageTheme.deletedBackgroundColor instead", level = DeprecationLevel.ERROR)
public val deletedMessagesBackground: Color,
public val giphyMessageBackground: Color,
public val threadSeparatorGradientStart: Color,
public val threadSeparatorGradientEnd: Color,
@Deprecated("Use MessageTheme.textStyle.color instead")
@Deprecated("Use MessageTheme.textStyle.color instead", level = DeprecationLevel.ERROR)
public val ownMessageText: Color = textHighEmphasis,
@Deprecated("Use MessageTheme.textStyle.color instead")
@Deprecated("Use MessageTheme.textStyle.color instead", level = DeprecationLevel.ERROR)
public val otherMessageText: Color = textHighEmphasis,
public val imageBackgroundMessageList: Color,
public val imageBackgroundMediaGalleryPicker: Color,
public val videoBackgroundMessageList: Color,
public val videoBackgroundMediaGalleryPicker: Color,
public val showMoreOverlay: Color,
public val showMoreCountText: Color,
@Deprecated("Use MessageTheme.quotedBackgroundColor instead")
@Deprecated("Use MessageTheme.quotedBackgroundColor instead", level = DeprecationLevel.ERROR)
public val ownMessageQuotedBackground: Color = otherMessagesBackground,
@Deprecated("Use MessageTheme.quotedBackgroundColor instead")
@Deprecated("Use MessageTheme.quotedBackgroundColor instead", level = DeprecationLevel.ERROR)
public val otherMessageQuotedBackground: Color = ownMessagesBackground,
@Deprecated("Use MessageTheme.quotedTextStyle.color instead")
@Deprecated("Use MessageTheme.quotedTextStyle.color instead", level = DeprecationLevel.ERROR)
public val ownMessageQuotedText: Color = textHighEmphasis,
@Deprecated("Use MessageTheme.quotedTextStyle.color instead")
@Deprecated("Use MessageTheme.quotedTextStyle.color instead", level = DeprecationLevel.ERROR)
public val otherMessageQuotedText: Color = textHighEmphasis,
) {

Expand Down

0 comments on commit eab381e

Please sign in to comment.