Skip to content

Instantly share code, notes, and snippets.

@mr5z
Created April 16, 2018 19:29
Show Gist options
  • Save mr5z/3bdf0e07cf6f16f1be0bbcf9ce2efb5a to your computer and use it in GitHub Desktop.
Save mr5z/3bdf0e07cf6f16f1be0bbcf9ce2efb5a to your computer and use it in GitHub Desktop.
@Override
public void onTaskEnd(PagedResult<List<Product>> result) {
if (result.isSuccess()) { // isSuccess guarantees result.data is not null
products.clear();
products.addAll(result.data); // AS warns me that result.data might be null
adapter.notifyDataSetChanged();
}
setRefreshing(false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment