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
state
andoffline
modules. #4214 - Moved
ClientState.user
toGlobalState.user
because the state module is the one that correctly updates the user in the SDK. #4333 - 🚨 Breaking change: Converted
Result
class into sealed class with two implementations:Result.Success
andResult.Failure
. #4356 - 🚨 Breaking change: Converted
ChatError
class into sealed class with three implementations:ChatError.Generic
,ChatError.Throwable
andChatError.Network
. #4368
stream-chat-android-client
🐞 Fixed
⬆️ Improved
- Removing unnecessary configuration fields for
OfflinePluginConfig
. #4376
✅ Added
- Added
isFilteringMessages
check onQueryChannelRequest
request. #3948 - Exposed
MessageType
,AttachmentType
andChannelType
classes containing useful constants. #4285
⚠️ Changed
- Removed
Channel::cid
from constructor. It's now an immutable property calculated based ontype
andid
. #4322
❌ Removed
- ClientMutableState is now an internal interface, intead of a public interface. #4374
- Remove ClientState.clearState() #4372
stream-chat-android-offline
✅ Added
- Added
loadNewestMessages
method toChatClient
that 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
loadNewestMessages
method toChatClient
that loads newest messages in the channel and clears the rest. #3948
⚠️ Changed
- Separated
QueryChannelListenerState
into state and databased focused classes. #4188 - Separated
ThreadQueryListener
into state and databased focused classes. #4208 - Rename of
QueryChannelsListenerImpl
toQueryChannelsListenerState
#4170 - Renamed
ChannelData::channelId
toChannelData::id
. #4322 - Removed
ChannelData::cid
from constructor. It's now an immutable property calculated based ontype
andid
. #4322 - Moved the send attachment logic to the LLC (Low Level Client) module #4244
❌ Removed
- Removed
EventHandlerImpl
from 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
MessageListController
which generalizes message list state and actions, exposing them to each SDK's ViewModel. #4157 - Added
MessageListState
,MessageListItemState
,MessageItemState
,DateSeparatorItemState
,ThreadSeparatorItemState
,SystemMessageItemState
,TypingItemState
,MessagePosition
,NewMessageState
,SelectedMessageState
andMessageFocusState
to keep track of the message list states. #4157 - Added
ClipboardHandler
that handles copy/pasting. #4157 - Added
DateSeparatorHandler
that handles when date separators should be shown. #4157 - Added
MessagePositionHandler
that determines the message group position inside the list. #4157 - Added
GiphyAction
to control giphies. #4157
⚠️ Changed
DateFormatter::formatDate
andDateFormatter::formatTime
methods 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_STORAGE
permission. 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
UserAvatarView
andChannelAvatarView
to replaceAvatarView
to 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 aViewHolder
capable 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
UnsupportedAttachmentFactory
for unsupported attachments. #4271 - Added attrs to
UnsupportedAttachmentsView
that allow to customize the UI of unsupported attachments in #4271:
streamUiUnsupportedAttachmentBackgroundColor
streamUiUnsupportedAttachmentStrokeColor
streamUiUnsupportedAttachmentStrokeWidth
streamUiUnsupportedAttachmentCornerRadius
streamUiUnsupportedAttachmentTitleTextSize
streamUiUnsupportedAttachmentTitleTextColor
streamUiUnsupportedAttachmentTitleTextFont
streamUiUnsupportedAttachmentTitleFontAssets
streamUiUnsupportedAttachmentTitleTextStyle
- 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 aViewHolder
capable 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
OnScrollToBottomHandler
toMessageListView
. #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
AttachmentGalleryViewMediaStyle
class. #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 createdMediaAttachmentGridViewStyle
class. #4283 - Added the attribute
streamUiAttachmentsPickerVideoIconDrawableTint
to theAttachmentsPickerDialog
styleable. You can use this attribute to change to tint of the video drawable displayed in the attachment picker video previews. #4299 - Added the attribute
streamUiAttachmentVideoLogoIconTint
to theMessageInputView
styleable. You can use this attribute to change to tint of the video drawable displayed in the attachment picker video previews. #4299 - Added the property
videoIconDrawableTint
toAttachmentSelectionDialogStyle
. 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
streamUiMessageListLoadingMoreView
attribute 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 aViewHolder
capable of previewing both images and videos. #4158 - 🚨 Breaking change:
ImageAttachmentViewStyle
has 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
streamUiSaveImageEnabled
has been renamed tostreamUiSaveMediaEnabled
. #4283 - 🚨 Breaking change: Attribute
streamUiSaveImageIcon
has been renamed tostreamUiSaveMediaIcon
. #4283 - 🚨 Breaking change: String resource
stream_ui_attachment_gallery_save_image
has been renamed tostream_ui_attachment_gallery_save_media
. #4283 - Aligned the information displayed in the title and subtitle of
ChannelActionsDialogFragment
with the information inMessageListHeaderView
. #4306 - 🚨 Breaking change:
MessageListViewModel
now usesMessageListController
for state and action handling. UpdatedMessageListViewModelFactory
with new parameters to be able to buildMessageListController
. #4157 - 🚨 Breaking change:
MessageListViewModel.Event.MessageReaction
no longer takesenforceUnique
as a parameter, instead it is handled as part ofenforceUniqueReaction
insideMessageListViewModelFactory
andMessageListController
. #4157 - 🚨 Breaking change:
ui-common
moduleGiphyAction
s are now used instead of removedGiphyAction
enum insideui-components
module. #4157 - 🚨 Breaking change:
MessageListItem
now usesMessagePosition
fromui-common
. #4157 - Replaced the Dexter library for checking runtime permissions with the PermissionX library. #4338
❌ Removed
- Removed
AvatarView
in favor ofUserAvatarView
andChannelAvatarView
to keep consistency with the Compose UI SDK. #4165 - The function
MessageListItemViewHolderFactory.createImageAttachmentsViewHolder()
has been removed in favor of the functionMessageListItemViewHolderFactory.createMediaAttachmentsViewHolder()
which returns aViewHolder
capable of previewing both images and videos. #4158 ImageAttachmentViewStyle
has 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
. UseMessageComposerView
instead. #4289 - Removed
GiphyAction
enum. #4157 - Removed
MessageListItem.Position
enum. #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_STORAGE
permission 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 overImagePreviewActivity
as 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 overImageAttachmentContent
as 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
,attachmentsContentGroupPreviewWidth
andattachmentsContentGroupPreviewHeight
toStreamDimens
. 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
MessageList
and support for bidirectional pagination. Added scroll to bottom handler toMessagesList
to load the newest messages before scrolling if they are not loaded already. #3948 - Added
MessageLazyListState
to replace the defaultLazyListState
.MessageLazyListState
is used to track the scroll position of the message list as well as the focused message offset. #3948 - Added properties
showMoreOverlay
andshowMoreCountText
toChatTheme
. 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
TypingItemState
as 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:
MessageAttachmentsContent
function parameteronImagePreviewResult: (ImagePreviewResult?) -> Unit
has been replaced withonMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit
. FunctionallyImagePreviewResult
andMediaGalleryPreviewResult
are the same, the only difference is the activity they are returned from so changes should be minimal. - 🚨 Breaking change:
QuotedMessageAttachmentContent
function parameteronImagePreviewResult: (ImagePreviewResult?) -> Unit
has been replaced withonMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit
. FunctionallyImagePreviewResult
andMediaGalleryPreviewResult
are the same, the only difference is the activity they are returned from so changes should be minimal. - 🚨 Breaking change:
MessageContent
function parameteronImagePreviewResult: (ImagePreviewResult?) -> Unit
has been replaced withonMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit
. FunctionallyImagePreviewResult
andMediaGalleryPreviewResult
are the same, the only difference is the activity they are returned from so changes should be minimal. - 🚨 Breaking change:
MessageContainer
function parameteronImagePreviewResult: (ImagePreviewResult?) -> Unit
has been replaced withonMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit
. FunctionallyImagePreviewResult
andMediaGalleryPreviewResult
are the same, the only difference is the activity they are returned from so changes should be minimal. - 🚨 Breaking change: Both bound (with
MessageListViewModel
as a parameter) and unboundMessageList
Composable functions have had parameteronImagePreviewResult: (ImagePreviewResult?) -> Unit
replaced withonMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit
. FunctionallyImagePreviewResult
andMediaGalleryPreviewResult
are 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 useMediaGalleryPreviewActivity
as 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 useMediaAttachmentFactory
as 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 useMediaAttachmentContent
as 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 useMediaAttachmentQuotedContent
as 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
,SelectedMessageState
andMessageFocusState
found inui-common
package. #4157 - 🚨 Breaking change:
MessageListViewModel
now usesMessageListController
for state and action handling. UpdatedMessagesViewModelFactory
with new parameters to be able to buildMessageListController
. #4157
❌ Removed
- 🚨 Breaking change: Removed compose
MessageMode
indicating 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-common
models:MessageListState
,MessageListItemState
,MessageItemState
,DateSeparatorState
,ThreadSeparatorState
,SystemMessageState
,MessagePosition
,NewMessageState
,SelectedMessageState
andMessageFocusState
. #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