Skip to content
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

Delete a chat item from SlidingDataSource #633

Closed
sulaiman-mlbd opened this issue Jan 14, 2020 · 3 comments
Closed

Delete a chat item from SlidingDataSource #633

sulaiman-mlbd opened this issue Jan 14, 2020 · 3 comments

Comments

@sulaiman-mlbd
Copy link

Hello, I am using CompoundMessage to show my chat in ChatViewController. I am using SlidingDataSource here. Now I want to delete a chat item from ChatViewController and for that want to remove an item from SlidingDataSource. But I can see that the index has some dependencies on some of the property named windowOffset, windowCount, itemsOffset. Can any explain to me about the properties or give me a proper way to delete an Element item from SlidingDataSources array?? I don't see any documentation on SlidingDataSource. Thanks in advance

@Denismih
Copy link

when delete or add new element in datasource you need to -1 or +1 to offset. If offset is 0 - do nothing.

@wiruzx
Copy link
Contributor

wiruzx commented May 15, 2020

Hey @sulaiman-mlbd
I've added example to ChattoApp to give an idea of how the message could be removed in #652.
Please bear in mind that ChattoApp is a demo app for Chatto, and is not intended for production use.

@wiruzx wiruzx closed this as completed May 15, 2020
@sulaiman-mlbd
Copy link
Author

@Denismih @wiruzx thanks for your reply. @wiruzx We used Chatto framework for a client project. The deadline was short so we used your framework instead of working from the ground. Thanks man for your effort. Chatto saved a lot of our time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants