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

[BUG] In DialogListAdapter, addItem(dialog) adds the item to end of the list but updates the first item #198

Closed
mayuroks opened this issue Sep 17, 2018 · 2 comments

Comments

@mayuroks
Copy link

mayuroks commented Sep 17, 2018

On adding a new dialog, item gets added but UI isn't updated.

/**
     * Add dialog to the end of dialogs list
     *
     * @param dialog dialog item
     */
    public void addItem(DIALOG dialog) {
        items.add(dialog);
        notifyItemInserted(0);        <=== should be notifyItemInserted(items.length() - 1)
    }
@bevzaanton
Copy link
Contributor

Hi! Yeah you are right! I can't understand how we missed it. I'll fix it. You can use method addItem(int position, DIALOG dialog) while I haven't update library.

@mayuroks
Copy link
Author

Yup! I am using the addItem(int position, DIALOG dialog) for now.

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

2 participants