Browse Source

Null checks. Fixes https://github.com/austinhuang0131/barinsta/issues/303

renovate/org.robolectric-robolectric-4.x
Ammar Githam 4 years ago
parent
commit
cc930c65b7
  1. 10
      app/src/main/java/awais/instagrabber/customviews/PostsRecyclerView.java

10
app/src/main/java/awais/instagrabber/customviews/PostsRecyclerView.java

@ -283,9 +283,13 @@ public class PostsRecyclerView extends RecyclerView {
} }
public void refresh() { public void refresh() {
lazyLoader.resetState();
postFetcher.reset();
postFetcher.fetch();
if (lazyLoader != null) {
lazyLoader.resetState();
}
if (postFetcher != null) {
postFetcher.reset();
postFetcher.fetch();
}
dispatchFetchStatus(); dispatchFetchStatus();
} }

Loading…
Cancel
Save