Browse Source

fix avatar persistence

legacy
Austin Huang 4 years ago
parent
commit
0164516343
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 4
      app/src/main/java/awais/instagrabber/adapters/PostsAdapter.java

4
app/src/main/java/awais/instagrabber/adapters/PostsAdapter.java

@ -89,9 +89,11 @@ public final class PostsAdapter extends RecyclerView.Adapter<PostViewHolder> {
final HttpURLConnection conn = (HttpURLConnection) new URL(postModel.getDisplayUrl()).openConnection();
conn.setUseCaches(false);
conn.connect();
if (conn.getResponseCode() != HttpURLConnection.HTTP_GONE)
if (conn.getResponseCode() != HttpURLConnection.HTTP_GONE) {
glideRequestManager.load(postModel.getDisplayUrl()).into(holder.postImage);
}
else return true;
}
catch (Exception urle) {
if (logCollector != null)
logCollector.appendException(urle, LogCollector.LogFile.ASYNC_POST_FETCHER, "doInBackground");

Loading…
Cancel
Save