luizgrp / SectionedRecyclerViewAdapter

An Adapter that allows a RecyclerView to be split into Sections with headers and/or footers. Each Section can have its state controlled individually.
MIT License
1.68k stars 372 forks source link

Enhance notify #64

Closed yccheok closed 7 years ago

yccheok commented 7 years ago

Sorry. I'm not sure what's wrong with my newly added code and unit test, which causes NPE. Do you have any idea?

java.lang.NullPointerException
    at android.support.v7.widget.RecyclerView$AdapterDataObservable.notifyItemRangeInserted(RecyclerView.java:11382)
    at android.support.v7.widget.RecyclerView$Adapter.notifyItemInserted(RecyclerView.java:6745)
    at io.github.luizgrp.sectionedrecyclerviewadapter.SectionedRecyclerViewAdapter.callSuperNotifyItemInserted(SectionedRecyclerViewAdapter.java:548)
    at io.github.luizgrp.sectionedrecyclerviewadapter.SectionedRecyclerViewAdapter.notifyHeaderInsertedInSection(SectionedRecyclerViewAdapter.java:815)
    at io.github.luizgrp.sectionedrecyclerviewadapter.SectionedRecyclerViewAdapterTest.notifyHeaderInsertedInSectionUsingSection_withAdapterWithManySections_callsSuperNotifyItemInserted(SectionedRecyclerViewAdapterTest.java:876)
luizgrp commented 7 years ago

could you please pull develop and merge into your branch so we only see your changes? cheers

yccheok commented 7 years ago

x

Hi @luizgrp

I created a branch from your master branch, and develop from there.

Am I doing correctly?

I believe the reason we are still seeing Frieder Bluemle, is because Frieder Bluemle change is in master branch, but not in develop branch?

luizgrp commented 7 years ago

You should have created your branch from develop. I moved the changes from Frieder to develop then they will disappear from here once you get the latest changes from develop.

yccheok commented 7 years ago

ok. I created another pull request, which branched out from develop branch.

https://github.com/luizgrp/SectionedRecyclerViewAdapter/pull/65/files