-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typing Indicator Support #911
Conversation
34a78f5
to
ee8e569
Compare
ee8e569
to
fa06818
Compare
@nathantannar4 Hello i an trying to use setTypingIndicatorViewHidden func but once set is hidden true app crash because the index path 0 |
What's the crash? Sent with GitHawk |
@nathantannar4 check this image |
The crash is not indicated in the image. Only the line it crashed on. Please share more information about how you encountered this crash. How many messages did you have? Where do you call setTypingIndicatorHidden? Sharing just an image of where the crash occurs does not give me enough information to reproduce Sent with GitHawk |
in the console log do not have any message but look on indexPath value in LLDB expression |
@ahmedAlmasri The crash is the red error line. You need to expand it. Also, answer my earlier inquires. If i can not reproduce it I cannot work on a solution. Sent with GitHawk |
Let me also be clear, you need messages in your view to show the typing indicator. It cannot be displayed on an empty collection view. Sent with GitHawk |
look this is steps |
Where are you calling Sent with GitHawk |
I am calling |
Ok, I pushed a guard check on the index path |
I am trying this but show new crash
|
Where does that happen? Sent with GitHawk |
after editing this func
and try the same steps the crash occurs |
Ok, sorry this isn't something I can reproduce. I would encourage you to try making some modifications and see what you come up with. Sent with GitHawk |
So @ahmedAlmasri I tried to recreate thus but couldnt. I was using the ChatExample project and turned the |
If you have this project on a public git I would love to check it out and try to debug it |
Ok, i will send my sample project to you, But for your information I am use this branch |
This is a curious crash, as the index path that it uses is determined by the collection view 🤔 |
@peihsendoyle @ahmedAlmasri I made a few changes to when the layout invalidation is called. As this isn't a bug I can reproduce at the moment in the example, if this change does not work can you please:
Thanks! This is definitely an issue we need to fix |
I tried your suggestions but it still doesn't work. It happens just only when I try to hide the indicator view (isHidden = true), it works when showing. Animated property doesn't take effect. |
When you experience this crash how many messages do you have on screen? Sent with GitHawk |
@peihsendoyle Made changes, please re-test for me |
Is this a project you could share with me so I could debug? If not please list a more details about the steps you took to produce this. I asked earlier how many messages you had. Anything useful you could share please do, these screenshots really don't help if I can't reproduce the crash because I don't know the state of everything. Sent with GitHawk |
okay. give me your bitbucket user, I will temporarily add you to the source code. @nathantannar4 |
Thank you. My username is Sent with GitHawk |
I’ve shared the repository (with read access) to you recently. Please check the source by yourself. If you have any question, just chat with me on Skype: peihsen_doyle. Please pull the branch: “origin/feature/typingIndicatorView” (not origin/master) Thanks and waiting for your solution. P/s: I’m integrating MessageKit by Cocoapods, and the git is branch “typingIndicatorView”. When you run “pod install”, maybe you will catch some errors within MessageKit, because the branch doesn’t catch up with “3.0.0-beta” branch. For example, hot fix the cocoapods code:
Last but not least, the app need your phone number to login by phone authentication (with verification code sent via sms). Please use these 2 demo account to boost the process because they have conversation together, no need to add friend or create new conversation.
The |
@peihsendoyle @ahmedAlmasri I have spent a few hours looking at this and do not understand why its crashing for you. I notice your compiling your code at Swift 4.0 when MessageKit is Swift 4.2 so I am not sure if that has anything to do with it. But I cannot reproduce this in the ChatExample so I am not sure what's going on internally in UIKit, as I have isolated the reason. I have added a variable that will provide a work around for you both until the core reason can be determined. Set
|
@nathantannar4 I'm using swift 4.2 |
@nathantannar4 my sample project sample-chat |
Ok clearly this method isn't going to be robust enough. Im going to close this and re-open an updated PR that reserves a section for the typing indicator, similar to #776 |
@ahmedAlmasri @peihsendoyle Care to review #1038 ? Much appreciated |
This PR adds TypingIndicator support by adding a new supplementary view rather than reserving the last section (as done in #776).
The default typing indicator is an iMessage style typing bubble out of the box but you can also implement your own typing indicator cells!
This implementation is still not complete but is in a functional state to compare against #776.
The goal should be to determine which is a better way of adding this feature, reserving a section, through a supplementary view, or perhaps another method entirely.