Giter Site home page Giter Site logo

Comments (14)

atsss avatar atsss commented on June 1, 2024 1

@santhoshvai @khushal87 Hi! Thanks for responding. Basically, I followed the example app. The following links are the reference.

Channel: https://github.com/GetStream/stream-chat-react-native/blob/develop/examples/ExpoMessaging/app/channel/%5Bcid%5D/index.tsx
Thread: https://github.com/GetStream/stream-chat-react-native/blob/develop/examples/ExpoMessaging/app/channel/%5Bcid%5D/thread/%5Bcid%5D/index.tsx

I attached the whole code snippets of Channel and Thread in the Project Related Information of this issue. I mainly changed three things from the references.

  1. Disable offline mode
  2. Use React Navigation instead of expo-router
  3. Add thread props to Channel component as reading the troubleshooting guide

Once I remove the thread props from Channel component, the count is updated as expected but it causes another issue, which is the message in a channel is sent to a thread.

  • How to navigate to a thread
    • Set a thread in OnThreadSelect callback
    • Navigate with React Navigation in OnThreadSelect callback
  const onThreadSelect = useCallback(
    (message: MessageType<StreamChatGenerics> | null) => {
      setThread(message);
      navigation.navigate('Thread');
    },
    [setThread, navigation]
  );

  return (
    <View style={{ flex: 1 }}>
      <MessageList
        onThreadSelect={onThreadSelect}
      />
      <MessageInput />
    </View>
  );
  • How to navigate back to a channel
    • Set null as thread in onThreadDismount callback
    • Navigate with React Navigation using Back in header
<Thread onThreadDismount={() => setThread(null)} />

from stream-chat-react-native.

atsss avatar atsss commented on June 1, 2024 1

@khushal87 Thanks for reminding me. I'll run the example in my local and come back soon.

from stream-chat-react-native.

stream-ci-bot avatar stream-ci-bot commented on June 1, 2024

🎉 This issue has been resolved in version 5.23.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

from stream-chat-react-native.

atsss avatar atsss commented on June 1, 2024

@khushal87 Hi Thanks for the hard work to fix it. I've tested it with 5.23.2 but I think the issue still exists. Could you please let me know if I need to change something on my side?

from stream-chat-react-native.

khushal87 avatar khushal87 commented on June 1, 2024

Hey @atsss, I tried the following issue on my iOS simulator and could not reproduce it as you mentioned. Do you have anything specific added as customization or props that causes a different behaviour for you?

Screen.Recording.2024-01-24.at.11.52.39.PM.mov

from stream-chat-react-native.

santhoshvai avatar santhoshvai commented on June 1, 2024

@atsss Could you share your code of how you navigate to thread and back.. maybe that gives a clue of why we cant reproduce this from our side..

I am reopening this issue

from stream-chat-react-native.

khushal87 avatar khushal87 commented on June 1, 2024

Hey @atsss, assuming you have a similar code as this, it works fine on our side with both offline support enabled and disabled. Also, we use react-navigation here in the example so can you check if there's something that you are doing differently? Thanks 😄

from stream-chat-react-native.

khushal87 avatar khushal87 commented on June 1, 2024

Hey @atsss, did the above work for you?

from stream-chat-react-native.

atsss avatar atsss commented on June 1, 2024

ssuming you have a similar code as this, it works fine on our side with both offline support enabled and disabled. Also, we use react-navigation here in the example so can you check if there's something that you are doing differently? Thanks 😄

@khushal87 I've checked the example in my local and the count is updated properly. Do you know why mine is not updated based on shared code snippets in the description 😅 ?

from stream-chat-react-native.

khushal87 avatar khushal87 commented on June 1, 2024

ssuming you have a similar code as this, it works fine on our side with both offline support enabled and disabled. Also, we use react-navigation here in the example so can you check if there's something that you are doing differently? Thanks 😄

@khushal87 I've checked the example in my local and the count is updated properly. Do you know why mine is not updated based on shared code snippets in the description 😅 ?

That's what confusing to me as well. Probably share your implementation snippet and we will try to find out something. 🙂

from stream-chat-react-native.

khushal87 avatar khushal87 commented on June 1, 2024

Hey @atsss, are you still facing this issue or it can be closed?

from stream-chat-react-native.

atsss avatar atsss commented on June 1, 2024

I'm still facing this issue. 😢

from stream-chat-react-native.

khushal87 avatar khushal87 commented on June 1, 2024

Even while using the code from our implementation?

from stream-chat-react-native.

atsss avatar atsss commented on June 1, 2024

It's working on the sample implementation but It's not working on my code snippets. I'll investigate more and come back if I need more help. Thank you

from stream-chat-react-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.