mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
fix crash
This commit is contained in:
parent
4af75efca3
commit
03c5fc4eb2
1 changed files with 8 additions and 1 deletions
|
@ -49,7 +49,14 @@ public abstract class ReadingAdapter extends FragmentStatePagerAdapter {
|
|||
@Override
|
||||
public void destroyItem(ViewGroup container, int position, Object object) {
|
||||
cachedFragments.remove(position);
|
||||
super.destroyItem(container, position, object);
|
||||
try {
|
||||
super.destroyItem(container, position, object);
|
||||
} catch (IllegalStateException ise) {
|
||||
// it appears that sometimes the pager impatiently deletes stale fragments befre
|
||||
// even calling it's own destroyItem method. we're just passing up the stack
|
||||
// after evicting our cache, so don't expose this internal bug from our call stack
|
||||
com.newsblur.util.Log.w(this, "ViewPager adapter rejected own destruction call.");
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void swapCursor(Cursor cursor) {
|
||||
|
|
Loading…
Add table
Reference in a new issue