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

[Feature] Use a SortedList<> internally to store messages in MessagesListAdapter? #184

Open
rossica opened this issue Aug 19, 2018 · 0 comments

Comments

@rossica
Copy link

rossica commented Aug 19, 2018

This could simplify the interface for adding new messages (instead of AddToEnd and AddToStart, there's just Add) and always ensure the proper order, if the backing store doesn't always return messages in the correct order.

I believe the type would look like SortedList<Wrapper>, and the callback for SortedList would call compare() on Wrapper.data, and equal() on Wrapper.data.
It would require, however, implementors of IMessage to implement compare() and equals() for that to work properly.

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

1 participant