Push notifyDataSetChanged invocation into adapter.

That is probably the place most responsible for knowing if the dataset has changed
and broadcasting that fact.
This commit is contained in:
Peter Serwylo 2016-12-01 11:01:26 +11:00
parent 17c97e577e
commit 6e0ea68bab
2 changed files with 2 additions and 1 deletions

View File

@ -490,7 +490,6 @@ public class AppDetails2 extends AppCompatActivity implements ShareChooserDialog
}
AppDetailsRecyclerViewAdapter adapter = (AppDetailsRecyclerViewAdapter)mRecyclerView.getAdapter();
adapter.updateItems(mApp);
adapter.notifyDataSetChanged();
supportInvalidateOptionsMenu();
}
});

View File

@ -118,6 +118,8 @@ public class AppDetailsRecyclerViewAdapter
addItem(VIEWTYPE_LINKS);
addItem(VIEWTYPE_PERMISSIONS);
addItem(VIEWTYPE_VERSIONS);
notifyDataSetChanged();
}
private void setShowVersions(boolean showVersions) {