Skip to content

Conversation

@kanat
Copy link
Contributor

@kanat kanat commented Oct 27, 2023

🎯 Goal

Closes: Closes: https://github.com/GetStream/android-internal-board/issues/203

We were listening ChannelMutableState changes instead of Channel changes.
ChannelMutableState contains lots of state flows which we're supposed to listen instead.
It's a lazy singleton state for a channel with the following lifecycle:

  • null
  • ChannelMutableState instance
  • null

🧪 Testing

  • install Compose Sample app
  • login as Kanat
  • kill the app
  • run this cmd
adb shell am start -n io.getstream.chat.android.compose.sample.debug/io.getstream.chat.android.compose.sample.ui.StartupActivity -e channelId messaging:6c0895b4-94b6-4bfc-9c24-703d3d6c8165

Note: This issue is intermittent; reproduction rate varies between 20-30% on my end

Actual

  • Channel title is Channel without name

Expected

  • Channel title is Reaction

☑️Contributor Checklist

General

  • I have signed the Stream CLA (required)
  • Assigned a person / code owner group (required)
  • Thread with the PR link started in a respective Slack channel (#android-chat-core or #android-chat-ui) (required)
  • PR targets the develop branch
  • PR is linked to the GitHub issue it resolves

Code & documentation

  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (KDocs, docusaurus, tutorial)

☑️Reviewer Checklist

  • UI Components sample runs & works
  • Compose sample runs & works
  • UI Changes correct (before & after images)
  • Bugs validated (bugfixes)
  • New feature tested and works
  • Release notes and docs clearly describe changes
  • All code we touched has new or updated KDocs

🎉 GIF

Please provide a suitable gif that describes your work on this pull request

@kanat kanat changed the base branch from main to develop October 27, 2023 22:55
@kanat kanat marked this pull request as ready for review October 27, 2023 22:59
@kanat kanat requested a review from a team as a code owner October 27, 2023 22:59
@kanat kanat added bug Something isn't working compose Jetpack Compose ui-components labels Oct 27, 2023
@kanat kanat changed the title Bugfix/channel state flow [i203] fix channel update emissions in MessageListController Oct 27, 2023
@kanat kanat marked this pull request as draft October 27, 2023 23:09
@kanat
Copy link
Contributor Author

kanat commented Oct 27, 2023

The fix is ready, but I need to write unit tests to cover this scenario.
That's why I keep as a draft for now.

PR is ready for review :)

@kanat kanat marked this pull request as ready for review October 30, 2023 20:54
@JcMinarro JcMinarro enabled auto-merge (rebase) October 31, 2023 11:36
@JcMinarro JcMinarro force-pushed the bugfix/channel-state-flow branch from edaf998 to 6994e22 Compare October 31, 2023 11:36
@JcMinarro JcMinarro merged commit 78cfded into develop Oct 31, 2023
@JcMinarro JcMinarro deleted the bugfix/channel-state-flow branch October 31, 2023 11:46
@kanat kanat mentioned this pull request Jan 17, 2024
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working compose Jetpack Compose ui-components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants