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
975 stars 326 forks source link

Message screen threads is not update when we open other channel #2124

Closed 12varun12 closed 1 year ago

12varun12 commented 1 year ago

Issue

Describe your issue here

when we open one channel and close it and then we open different channel then it is not updated at that time it shows the threads of previous one channel.

Steps to reproduce

Steps to reproduce the behavior: 1) click on one channel and close it 2) open another channel then the message threads is vissible but message thread is from previous channel not from currently opened channel


Expected behavior

when we click on different channel then the message thread must be updated according to the channel


Project Related Information

Customization

I have customise the message screen, but not the whole screen we customise Empty screen state, date header, date separator that's it.

Click To Expand

```typescript jsx # N/A ```


Offline support


Environment

Click To Expand

#### `package.json`: ```json # N/A ``` **`react-native info` output:** "react-native": "0.70.3", ``` OUTPUT GOES HERE ``` - **Platform that you're experiencing the issue on**: issue in Both devices - **`stream-chat-react-native` version you're using that has this issue:** "stream-chat-react-native": "5.14.1" - Device/Emulator info: for all devices in android and ios


Additional context


Screenshots

Click To Expand


khushal87 commented 1 year ago

Hey @12varun12 we're not able to reproduce this behaviour on our side. Can you please check if you pass the correct channel and message id when navigating?

12varun12 commented 1 year ago

We are passing correct data before navigation, actually before MessageList component i have applied console.log and we got correct channel but there is no changes occurs in MessageList component It show old channel

On Wed, 31 May 2023 at 19:10, Khushal Agarwal @.***> wrote:

Hey @12varun12 https://github.com/12varun12 we're not able to reproduce this behaviour on our side. Can you please check if you pass the correct channel and message id when navigating?

— Reply to this email directly, view it on GitHub https://github.com/GetStream/stream-chat-react-native/issues/2124#issuecomment-1570258821, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW6DPYCH2EAAF57UGB6KHW3XI5C4RANCNFSM6AAAAAAYTJG2DE . You are receiving this because you were mentioned.Message ID: @.***>

12varun12 commented 1 year ago

can you please provide me any solution because it's urgent

On Wed, 31 May 2023 at 19:47, Varun Prakash @.***> wrote:

We are passing correct data before navigation, actually before MessageList component i have applied console.log and we got correct channel but there is no changes occurs in MessageList component It show old channel

On Wed, 31 May 2023 at 19:10, Khushal Agarwal @.***> wrote:

Hey @12varun12 https://github.com/12varun12 we're not able to reproduce this behaviour on our side. Can you please check if you pass the correct channel and message id when navigating?

— Reply to this email directly, view it on GitHub https://github.com/GetStream/stream-chat-react-native/issues/2124#issuecomment-1570258821, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW6DPYCH2EAAF57UGB6KHW3XI5C4RANCNFSM6AAAAAAYTJG2DE . You are receiving this because you were mentioned.Message ID: @.***>

khushal87 commented 1 year ago

Hey, can you share a video of what is happening so we can look into it further? Did you follow our tutorial while creating the app? Also, please check if your code and navigation logic looks similar to this and also don't forget to dismount the component like this.

Documentation for onThreadDismount is present here.

faisalkhan-dianapps commented 1 year ago

hey @khushal87

Please find the video for the reported issue https://drive.google.com/file/d/1Hu4h4gVQ5JtT1_qj0vBHMmDKdooGBYsu/view?usp=sharing

This issue is coming for different cases as well.

  1. Open any user chat thread >> Background/Foreground >> The chat thread is not updated when the user clicks on the push notification. Currently, only the user name is updated https://drive.google.com/file/d/1SofMAeG8avszlTOahc_5duYPWG8ZYAyv/view?usp=sharing

  2. Chat thread is not updated when the user opens the chat push notification https://drive.google.com/file/d/1uLy049ceb0IEx2phw9VuT-ZlXHDQl1CR/view?usp=sharing

I am attaching videos for all three issues, Do let us know to in case you need any other information for the same

12varun12 commented 1 year ago

https://github.com/GetStream/stream-chat-react-native/assets/96221152/ca615164-2e79-4ff9-97dd-9abf097a32f6

I have added one video related to message thread issue, we are facing the issue where we pass the channel but the threads are not updated on the message detail screen. When we send the message then the screen gets updated and all the messages gets appear.

Can you please look into it on high priority?

12varun12 commented 1 year ago

Hey team, Any update on it

vishalnarkhede commented 1 year ago

Hey @12varun12 @faisalkhan-dianapps to investigate this any further, we would need some code snippets of your implementation. You can share code snippets with support@getstream.io

12varun12 commented 1 year ago

ok will share with you

On Thu, 14 Sept 2023 at 12:42, Vishal Narkhede @.***> wrote:

Hey @12varun12 https://github.com/12varun12 @faisalkhan-dianapps https://github.com/faisalkhan-dianapps to investigate this any further, we would need some code snippets of your implementation. You can share code snippets with @.***

  • code around navigation from channel list to channel screen
  • code around Channel component

— Reply to this email directly, view it on GitHub https://github.com/GetStream/stream-chat-react-native/issues/2124#issuecomment-1718888168, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW6DPYBAQKMN4JFSVOM2Z6TX2KU5DANCNFSM6AAAAAAYTJG2DE . You are receiving this because you were mentioned.Message ID: @.***>

vishalnarkhede commented 1 year ago

I am going to close this issue. My best guess would be that its something to do with mounting/unmounting of Channel screen during navigation, and not much to do with sdk components. But lets discuss it over email thread.