Overview
Stream Chat SDK for Android v6.0.0-beta1 was released. 🎉
Check out Stream Chat Android: v6 Beta Announcement for more information.
Common changes for all artifacts
⬆️ Improved
- Updated Kotlin version to
1.7.20. #4247
✅ Added
⚠️ Changed
- Separated
stateandofflinemodules. #4214 - Moved
ClientState.usertoGlobalState.userbecause the state module is the one that correctly updates the user in the SDK. #4333 - 🚨 Breaking change: Converted
Resultclass into sealed class with two implementations:Result.SuccessandResult.Failure. #4356 - 🚨 Breaking change: Converted
ChatErrorclass into sealed class with three implementations:ChatError.Generic,ChatError.ThrowableandChatError.Network. #4368
stream-chat-android-client
🐞 Fixed
⬆️ Improved
- Removing unnecessary configuration fields for
OfflinePluginConfig. #4376
✅ Added
- Added
isFilteringMessagescheck onQueryChannelRequestrequest. #3948 - Exposed
MessageType,AttachmentTypeandChannelTypeclasses containing useful constants. #4285
⚠️ Changed
- Removed
Channel::cidfrom constructor. It's now an immutable property calculated based ontypeandid. #4322
❌ Removed
- ClientMutableState is now an internal interface, intead of a public interface. #4374
- Remove ClientState.clearState() #4372
stream-chat-android-offline
✅ Added
- Added
loadNewestMessagesmethod toChatClientthat loads newest messages in the channel and clears the rest. #3948
⚠️ Changed
- Changed the logic how the end of pages is determined inside
ChannelLogic.onQueryChannelResult. Added loadNewestMessages inChannelLogic. Added check to prevent upserting new messages if newest page isn't loaded to avoid breaking pagination. #3948
❌ Removed
stream-chat-android-state
🐞 Fixed
- Stop showing a blink of empty state screen when loading channel without loading from database first. #4261
- Fixing hard coded user presence of watchChannel method. #4375
✅ Added
- Adding ChannelState.getMessageById to fetch messages from the state of the SDK. #4292
- Added
loadNewestMessagesmethod toChatClientthat loads newest messages in the channel and clears the rest. #3948
⚠️ Changed
- Separated
QueryChannelListenerStateinto state and databased focused classes. #4188 - Separated
ThreadQueryListenerinto state and databased focused classes. #4208 - Rename of
QueryChannelsListenerImpltoQueryChannelsListenerState#4170 - Renamed
ChannelData::channelIdtoChannelData::id. #4322 - Removed
ChannelData::cidfrom constructor. It's now an immutable property calculated based ontypeandid. #4322 - Moved the send attachment logic to the LLC (Low Level Client) module #4244
❌ Removed
- Removed
EventHandlerImplfrom the codebase. #4207
stream-chat-android-ui-common
⬆️ Improved
- Updated Compose compiler version to
1.3.2. (#4247)[https://github.com//pull/4247]
✅ Added
- Added
MessageListControllerwhich generalizes message list state and actions, exposing them to each SDK's ViewModel. #4157 - Added
MessageListState,MessageListItemState,MessageItemState,DateSeparatorItemState,ThreadSeparatorItemState,SystemMessageItemState,TypingItemState,MessagePosition,NewMessageState,SelectedMessageStateandMessageFocusStateto keep track of the message list states. #4157 - Added
ClipboardHandlerthat handles copy/pasting. #4157 - Added
DateSeparatorHandlerthat handles when date separators should be shown. #4157 - Added
MessagePositionHandlerthat determines the message group position inside the list. #4157 - Added
GiphyActionto control giphies. #4157
⚠️ Changed
DateFormatter::formatDateandDateFormatter::formatTimemethods now accept Dates instead of classes from ThreeTenABP API. #4320
❌ Removed
- Removed ThreeTenABP dependency. #4320
stream-chat-android-ui-components
🐞 Fixed
- Fixed scroll to bottom. #3849
- Fixed search for messages. #3861
- Fixed thread list initials scroll state. #4157
⬆️ Improved
- Improved asking for
WRITE_EXTERNAL_STORAGEpermission. The permission won't be requested starting from Android Q unless legacy external storage is requested. #4219 - Improved the stability of cooldown timer in slow mode. #4251
- Improved how system bar colors are handled on the attachment gallery screen. #4269
- The default attachment gallery is now able to handle videos as well as images. #4283
- Improved the way video length information is displayed over video previews inside the attachment picker. #4299
✅ Added
- Added
UserAvatarViewandChannelAvatarViewto replaceAvatarViewto keep consistency with the Compose UI SDK. #4165 - Added the ability to turn off video previews (thumbnails) via
ChatUI.videoThumbnailsEnabled. Video previews are a paid feature and as such you can turn them off. They are on by default and the pricing can be found here. #4158 - Added a new function
MessageListItemViewHolderFactory.createMediaAttachmentsViewHolder()which returns aViewHoldercapable of previewing both images and videos. #4158 - Added a style class called
MediaAttachmentViewStyle. The new style controls how previews of both image and video attachments are displayed inside the message list. #4158 - Added
UnsupportedAttachmentFactoryfor unsupported attachments. #4271 - Added attrs to
UnsupportedAttachmentsViewthat allow to customize the UI of unsupported attachments in #4271:
streamUiUnsupportedAttachmentBackgroundColorstreamUiUnsupportedAttachmentStrokeColorstreamUiUnsupportedAttachmentStrokeWidthstreamUiUnsupportedAttachmentCornerRadiusstreamUiUnsupportedAttachmentTitleTextSizestreamUiUnsupportedAttachmentTitleTextColorstreamUiUnsupportedAttachmentTitleTextFontstreamUiUnsupportedAttachmentTitleFontAssetsstreamUiUnsupportedAttachmentTitleTextStyle
- Added a page about Sample Apps to the docs. #4282
- Added the ability to turn off video previews (thumbnails) via
ChatUI.videoThumbnailsEnabled. Video previews are a paid feature and as such you can turn them off. They are on by default and the pricing can be found here. #4158 - Added a new function
MessageListItemViewHolderFactory.createMediaAttachmentsViewHolder()which returns aViewHoldercapable of previewing both images and videos. #4158 - Added a style class called
MediaAttachmentViewStyle. The new style controls how previews of both image and video attachments are displayed inside the message list. #4158 - Added
OnScrollToBottomHandlertoMessageListView. #3849 - Added the ability to style the play button inside the attachment gallery. The necessary attributes along with their description can be found here. These attributes can be parsed using the newly created
AttachmentGalleryViewMediaStyleclass. #4283 - Added new styled attributes for
MediaAttachmentGridView. The new attributes along with their description can be found here. These attributes can be parsed using the newly createdMediaAttachmentGridViewStyleclass. #4283 - Added the attribute
streamUiAttachmentsPickerVideoIconDrawableTintto theAttachmentsPickerDialogstyleable. You can use this attribute to change to tint of the video drawable displayed in the attachment picker video previews. #4299 - Added the attribute
streamUiAttachmentVideoLogoIconTintto theMessageInputViewstyleable. You can use this attribute to change to tint of the video drawable displayed in the attachment picker video previews. #4299 - Added the property
videoIconDrawableTinttoAttachmentSelectionDialogStyle. You can use this property to change to tint of the video drawable displayed in the attachment picker video previews. #4299 - Added a guide that demonstrates how use events to close the chat screen when the current user has been removed from the channel. #4078
- Added loading more indicator to
MessageListView. #4309 - Added the
streamUiMessageListLoadingMoreViewattribute to customize the layout of loading more indicator inMessageListView. #4309
⚠️ Changed
- 🚨 Breaking change: The function
MessageListItemViewHolderFactory.createImageAttachmentsViewHolder()has been removed in favor of the functionMessageListItemViewHolderFactory.createMediaAttachmentsViewHolder()which returns aViewHoldercapable of previewing both images and videos. #4158 - 🚨 Breaking change:
ImageAttachmentViewStylehas been removed and replaced byMediaAttachmentViewStyle. The new style controls how previews of both image and video attachments are displayed inside the message list. #4158 - 🚨 Breaking change: Attribute
streamUiSaveImageEnabledhas been renamed tostreamUiSaveMediaEnabled. #4283 - 🚨 Breaking change: Attribute
streamUiSaveImageIconhas been renamed tostreamUiSaveMediaIcon. #4283 - 🚨 Breaking change: String resource
stream_ui_attachment_gallery_save_imagehas been renamed tostream_ui_attachment_gallery_save_media. #4283 - Aligned the information displayed in the title and subtitle of
ChannelActionsDialogFragmentwith the information inMessageListHeaderView. #4306 - 🚨 Breaking change:
MessageListViewModelnow usesMessageListControllerfor state and action handling. UpdatedMessageListViewModelFactorywith new parameters to be able to buildMessageListController. #4157 - 🚨 Breaking change:
MessageListViewModel.Event.MessageReactionno longer takesenforceUniqueas a parameter, instead it is handled as part ofenforceUniqueReactioninsideMessageListViewModelFactoryandMessageListController. #4157 - 🚨 Breaking change:
ui-commonmoduleGiphyActions are now used instead of removedGiphyActionenum insideui-componentsmodule. #4157 - 🚨 Breaking change:
MessageListItemnow usesMessagePositionfromui-common. #4157 - Replaced the Dexter library for checking runtime permissions with the PermissionX library. #4338
❌ Removed
- Removed
AvatarViewin favor ofUserAvatarViewandChannelAvatarViewto keep consistency with the Compose UI SDK. #4165 - The function
MessageListItemViewHolderFactory.createImageAttachmentsViewHolder()has been removed in favor of the functionMessageListItemViewHolderFactory.createMediaAttachmentsViewHolder()which returns aViewHoldercapable of previewing both images and videos. #4158 ImageAttachmentViewStylehas been removed and replaced byMediaAttachmentViewStyle. The new style controls how previews of both image and video attachments are displayed inside the message list. #4158- 🚨 Breaking change: Removed the old
MessageInputView. UseMessageComposerViewinstead. #4289 - Removed
GiphyActionenum. #4157 - Removed
MessageListItem.Positionenum. #4157
stream-chat-android-compose
🐞 Fixed
- Fixed pagination when the newest messages aren't loaded and we are paginating newer messages pagination. Fixed scroll to bottom if the newest messages aren't loaded. #3948
- Fixed thread list initials scroll state. #4157
⬆️ Improved
- Improved the way the ChannelsScreen is built. #4183
- Improved the way the MessagesScreen is built. #4183
- Improved automatic reloading of non-cached images when regaining network connection. The improvements are visible in the messages list and the new media gallery called
MediaGalleryPreviewActivity. #4096 - Improved requesting
WRITE_EXTERNAL_STORAGEpermission when legacy storage is requested. #4219 - Improved the stability of cooldown timer in slow mode. #4251
- Improved how system bar colors are handled on the gallery screen. #4267
- Improved the way video length information is displayed over video previews inside the attachment picker. #4299
✅ Added
- Added a new gallery called
MediaGalleryPreviewActivity. This gallery is an upgrade overImagePreviewActivityas it has the capability to reproduce videos as well as images, automatically reloads non-cached images upon regaining network connection and works in offline mode. #4096 - Added
MediaAttachmentContent. The new composable is an improvement overImageAttachmentContentas it has the ability to preview both videos and images and has access to the new and improved media gallery and the ability to tile more than 4 previews by modifying the parametermaximumNumberOfPreviewedItems. #4096 - Added
MediaAttachmentFactory. The new factory is an improvement overImageAttachmentFactory. The new factory hs the ability to preview videos and the ability to tile more than 4 previews in a group by changing the value of the parametermaximumNumberOfPreviewedItems. #4096 - Added parameters
attachmentsContentVideoMaxHeight,attachmentsContentMediaGridSpacing,attachmentsContentVideoWidth,attachmentsContentGroupPreviewWidthandattachmentsContentGroupPreviewHeighttoStreamDimens. These parameters are meant for more finer grained control over how media previews are displayed in the message list. For the best aesthetic outcome, the width of these should be equal to the value inStreamDimens.messageItemMaxWidth. #4096 - Added the ability to turn off video previews (thumbnails) via
ChatTheme.videoThumbnailsEnabled. Video previews are a paid feature and as such you can turn them off. They are on by default and the pricing can be found here. #4096 - Added fallback factory for unsupported attachments. #4270
- Added a page about Sample Apps to the docs. #4282
- Added end pagination handler to
MessageListand support for bidirectional pagination. Added scroll to bottom handler toMessagesListto load the newest messages before scrolling if they are not loaded already. #3948 - Added
MessageLazyListStateto replace the defaultLazyListState.MessageLazyListStateis used to track the scroll position of the message list as well as the focused message offset. #3948 - Added properties
showMoreOverlayandshowMoreCountTexttoChatTheme. These properties are designed to change the appearance of the show more count that appears when a message contains more media attachments than are able to be displayed in the message list media content preview. #4293 - Added
TypingItemStateas a type ofMessageistItemState. To show the typing item custom composable needs to be provided.
⚠️ Changed
- Changed the way ChannelsScreen and MessagesScreen components are built. Instead of exposing a ton of parameters for customization, we now expose a ViewModelFactory that accepts them. #4183
- Using this new approach you can reuse and connect to ViewModels from the outside, if you want to power custom behavior. Make sure to check out our documentation regarding these components. #4183
- 🚨 Breaking change:
MessageAttachmentsContentfunction parameteronImagePreviewResult: (ImagePreviewResult?) -> Unithas been replaced withonMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit. FunctionallyImagePreviewResultandMediaGalleryPreviewResultare the same, the only difference is the activity they are returned from so changes should be minimal. - 🚨 Breaking change:
QuotedMessageAttachmentContentfunction parameteronImagePreviewResult: (ImagePreviewResult?) -> Unithas been replaced withonMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit. FunctionallyImagePreviewResultandMediaGalleryPreviewResultare the same, the only difference is the activity they are returned from so changes should be minimal. - 🚨 Breaking change:
MessageContentfunction parameteronImagePreviewResult: (ImagePreviewResult?) -> Unithas been replaced withonMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit. FunctionallyImagePreviewResultandMediaGalleryPreviewResultare the same, the only difference is the activity they are returned from so changes should be minimal. - 🚨 Breaking change:
MessageContainerfunction parameteronImagePreviewResult: (ImagePreviewResult?) -> Unithas been replaced withonMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit. FunctionallyImagePreviewResultandMediaGalleryPreviewResultare the same, the only difference is the activity they are returned from so changes should be minimal. - 🚨 Breaking change: Both bound (with
MessageListViewModelas a parameter) and unboundMessageListComposable functions have had parameteronImagePreviewResult: (ImagePreviewResult?) -> Unitreplaced withonMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit. FunctionallyImagePreviewResultandMediaGalleryPreviewResultare the same, the only difference is the activity they are returned from so changes should be minimal. - Video previews are now automatically displayed. These are a paid feature and can be turned off via
ChatTheme.videoThumbnailsEnabled. If you are interested in the pricing before making a decision, you can find it here. #4096 - Started the deprecation process for
ImagePreviewActivity, please useMediaGalleryPreviewActivityas it has all the functionality of the previous gallery while adding additional features such as video playback and offline capabilities. #4096 - Started the deprecation process for
ImageAttachmentFactory, please useMediaAttachmentFactoryas it has all the functionality of the previous factory while adding additional features such as displaying video previews modifiable number of tiles in a group preview. #4096 - Started the deprecation process for
ImageAttachmentContent, please useMediaAttachmentContentas it has all the functionality of the previous component while adding additional features such as displaying video previous and modifiable number of tiles in a group preview. #4096 - Started the deprecation process for
ImageAttachmentQuotedContent, please useMediaAttachmentQuotedContentas it retains all of the previous functionality while adding the ability to preview video attachments. #4096 - 🚨 Breaking change: Compose now uses
MessageListState,MessageListItemState,MessageItemState,DateSeparatorItemState,ThreadSeparatorItemState,SystemMessageItemState,TypingItemState,MessagePosition,NewMessageState,SelectedMessageStateandMessageFocusStatefound inui-commonpackage. #4157 - 🚨 Breaking change:
MessageListViewModelnow usesMessageListControllerfor state and action handling. UpdatedMessagesViewModelFactorywith new parameters to be able to buildMessageListController. #4157
❌ Removed
- 🚨 Breaking change: Removed compose
MessageModeindicating whether the list is in thread mode or normal mode in favor of ui-commonMessageMode. #4157 - 🚨 Breaking change: Removed compose models in favor of
ui-commonmodels:MessageListState,MessageListItemState,MessageItemState,DateSeparatorState,ThreadSeparatorState,SystemMessageState,MessagePosition,NewMessageState,SelectedMessageStateandMessageFocusState. #4157 - 🚨 Breaking change: Removed
MessageListViewModel.focusMessage(). To achieve the same effect useMessageListViewModel.scrollToMessage(messageId: String). #4157
stream-chat-android-markdown-transformer
⬆️ Improved
- The default factory for previewing video and image attachment now is
MediaAttachmentFactory. It holds numerous improvements, the biggest of which are the ability to reload the image intelligently if the image wasn't loaded and network connection is re-established and the access to the new and improved media gallery. #4096