GetStream / stream-chat-react-native

πŸ’¬ React-Native Chat SDK ➜ Stream Chat. Includes a tutorial on building your own chat app experience using React-Native, React-Navigation and Stream
https://getstream.io/chat/sdk/react-native/
Other
955 stars 321 forks source link

πŸ”₯ [πŸ›] initialScrollToFirstUnreadMessage does not work #2591

Open ricardojmf opened 2 months ago

ricardojmf commented 2 months ago

Issue

I'm trying to check the default InlineUnreadIndicator but with no success, it does not appear (even if I declare that I'm using it). I research your code base and saw that for it to appear the scrollToBottomButtonVisible should be true which mean that we have to open the chat with lots of unread messages pointed to the first one so that the scroll to button appears on the screen.

Unfortuanatelly this also did not work, I've added the prop initialScrollToFirstUnreadMessage to my <MessageList />component but it does not scroll to the first unread message (I've tested with 30 and 40 unread mesages)

Steps to reproduce

Steps to reproduce the behavior:

Having this config:

<MessageList
  initialScrollToFirstUnreadMessage
  InlineUnreadIndicator={InlineUnreadIndicator}
/>
  1. open up a chat with 40 unread messages
  2. wait for it to point to the first unread message
  3. it does not scroll
  4. it stays at the bottom (most recent message)

Expected behavior

  1. open up a chat with 40 unread messages
  2. wait for it to point to the first unread message
  3. it scrolls
  4. the InlineUnreadIndicator should appear

Project Related Information

Customization

Click To Expand

```tsx ```

Offline support

Environment

Click To Expand

#### `package.json`: ```json # N/A ``` **`react-native info` output:** ``` System: OS: macOS 14.5 CPU: (8) arm64 Apple M1 Pro Memory: 255.31 MB / 32.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.12.2 path: ~/.nvm/versions/node/v20.12.2/bin/node Yarn: Not Found npm: version: 10.5.0 path: ~/.nvm/versions/node/v20.12.2/bin/npm Watchman: version: 2024.05.06.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.15.2 path: /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 23.5 - iOS 17.5 - macOS 14.5 - tvOS 17.5 - visionOS 1.2 - watchOS 10.5 Android SDK: Not Found IDEs: Android Studio: 2023.1 AI-231.9392.1.2311.11076708 Xcode: version: 15.4/15F31d path: /usr/bin/xcodebuild Languages: Java: version: 17.0.10 path: /usr/bin/javac Ruby: version: 3.2.2 path: /Users/ricardo.figueiredo/.rbenv/shims/ruby npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.73.6 wanted: 0.73.6 react-native-macos: Not Found npmGlobalPackages: "*react-native*": Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: true newArchEnabled: false ``` - **Platform that you're experiencing the issue on**: - [] iOS - [ ] Android - [x] **iOS** but have not tested behavior on Android - [ ] **Android** but have not tested behavior on iOS - [ ] Both - **`stream-chat-react-native` version you're using that has this issue:** - `5.33.1` - Device/Emulator info: - [x] I am using a physical device - Device/Emulator: `iPhone 13`

Additional context

Screenshots

Click To Expand


sergeyzhukov commented 1 month ago

same issue