Skip to content

Commit

Permalink
* Applied best practices for sorted list & diff callback
Browse files Browse the repository at this point in the history
  • Loading branch information
longbkiter07 committed Apr 24, 2017
1 parent 37cea4e commit 65fe2d3
Show file tree
Hide file tree
Showing 10 changed files with 963 additions and 683 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
mSyncAdapter.remove((int) (Math.random() * mSyncAdapter.getItemCount() - 1));
} else {
mRxUserRecyclerViewAdapter.getObservableAdapterManager()
.removeAt((int) (Math.random() * mRxUserRecyclerViewAdapter.getItemCount() - 1))
.removeItemAt((int) (Math.random() * mRxUserRecyclerViewAdapter.getItemCount() - 1))
.subscribe();
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ public ItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {

@Override
public void onBindViewHolder(ItemViewHolder holder, int position) {
holder.bind(mUserRxSortedList.getItemAt(position));
holder.bind(mUserRxSortedList.get(position));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
public class DataFactory {

public static final int CHUNK = 10000;
public static final int CHUNK = 10;

private DataFactory() {

Expand Down
Loading

0 comments on commit 65fe2d3

Please sign in to comment.