Repository navigation
Bump Stream Chat Android to 7.13 - #66
Merged
Merged
Conversation
Move every sample from Stream Chat Android 6.1.1 to 7.13.0 and update the toolchain v7 needs: Kotlin 2.2.21, AGP 8.13.2, Gradle 8.13, compileSdk 36 and navigation 2.8.4. The Compose sample now uses the Kotlin Compose compiler plugin instead of composeOptions. The Gradle heap goes to 4g because D8 ran out of memory at 2g with the larger v7 dependency graph. API moves, following the v6 to v7 migration guide: - The offline and state artifacts are gone. Clients are configured with ChatClientConfig(offlineEnabled = true, userPresence = true) instead of withPlugins(...). - XML: MessageListViewModelFactory -> ChannelViewModelFactory, MessageListHeaderView/ViewModel -> ChannelHeaderView/ViewModel (layout attrs streamUiMessageListHeader* -> streamUiChannelHeader*), MessageListActivity/Fragment -> ChannelActivity/Fragment, MessageListListenerContainer -> MessageListListeners, addSelectedAttachments -> addAttachments, and bindData now takes a non-null MessageListItemPayloadDiff. - Compose: AttachmentFactory and the attachmentFactories ChatTheme params are gone, so the date attachment rendering moves into a ChatComponentFactory (CustomAttachmentContent, MessageComposerAttachments, MessageQuotedContent, MessageComposerQuotedMessage, MessageComposerLeadingContent). MessagesViewModelFactory -> ChannelViewModelFactory, MessageListHeader -> ChannelHeader, the composer integrations slot -> onAttachmentsClick, ChannelsScreen onItemClick -> onChannelClick, CancelIcon -> ComposerCancelIcon, and theme tokens move to StreamDesign names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps every sample in this repo from Stream Chat Android 6.1.1 to 7.13.0 (newest 7.x on Maven Central). The live Chat Android v7 docs link
video-chat-sample,virtual-event-sampleandwhatsapp-clone-samplefrom here, so the repo should build against v7. No module uses Stream Video.Versions
The Compose sample now uses the Kotlin Compose compiler plugin (
org.jetbrains.kotlin.plugin.compose) instead ofcomposeOptionsand the old compiler artifact.Changes per module
All modules that used
stream-chat-android-offlineandstream-chat-android-statedrop them (merged into the client in v7). TheirwithPlugins(...)setup becomes.config(ChatClientConfig(offlineEnabled = true, userPresence = true)).MessageListViewModelFactory->ChannelViewModelFactory,MessageListHeaderView/MessageListHeaderViewModel->ChannelHeaderView/ChannelHeaderViewModel(layout attrsstreamUiMessageListHeader*->streamUiChannelHeader*, view id renamed tochannelHeaderView). The livestreamPlainTextViewHolder.bindDatanow takes a non-nullMessageListItemPayloadDiff.ChannelViewModelFactoryandChannelHeaderViewModelreplace the old factory and header ViewModel.MessageListListenerContainer->MessageListListeners, andaddSelectedAttachments->addAttachments.MessageListActivity/MessageListFragment->ChannelActivity/ChannelFragment(createChannelFragment;setupMessageComposeris still the override point),MessageListListenerContainer->MessageListListeners,addSelectedAttachments->addAttachments.AttachmentFactoryand theattachmentFactories/quotedAttachmentFactoriesparams onChatTheme, so the date attachment rendering moves into a newCustomChatComponentFactory(CustomAttachmentContent,MessageComposerAttachments,MessageQuotedContent,MessageComposerQuotedMessage). The SDK's own v7 ui-guides sample is built the same way. The composerintegrationsslot is gone: the calendar button is now theMessageComposerLeadingContentoverride, andMessageComposer(onAttachmentsClick = ...)opens the date picker. Other renames:MessagesViewModelFactory->ChannelViewModelFactory,MessageListHeader->ChannelHeader,ChannelsScreen(onItemClick)->onChannelClick,CancelIcon->ComposerCancelIcon. Theme tokens moved to StreamDesign:textHighEmphasis->textPrimary,textLowEmphasis->textSecondary,barsBackground->backgroundCoreSurfaceDefault,appBackground->backgroundCoreApp,typography.body->bodyDefault,shapes.attachment->RoundedCornerShape(12.dp), and the removedinfoAccent->accentSuccess. The date attachment now also setsfallbackso channel-list previews still show the date, which the removedtextFormatterused to do.How this was checked
Run locally with Temurin JDK 17.0.20.1 (macOS aarch64) and Android SDK platform 36 / build-tools 36.0.0, after a
./gradlew clean:./gradlew --no-build-cache --rerun-tasks spotlessCheck: BUILD SUCCESSFUL.spotlessApplychanged import order only../gradlew --no-build-cache assembleDebug(whatpr-checks.ymlruns): BUILD SUCCESSFUL, all 6 modules../gradlew --no-build-cache build(assembles debug and release, lint, unit tests): BUILD SUCCESSFUL.Not checked
None of the apps was run on a device or emulator, so everything is compile-level only. Please look at these visually:
accentSuccesscolour that replacesinfoAccent.ChannelHeaderViewkeeps the custom back icon, the background and the hidden avatar. Also check the back-button padding workaround, which walks the header's ImageViews.MessageComposerView.🤖 Generated with Claude Code