mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 14:47:29 +00:00
maybe simpler is better
This commit is contained in:
parent
0164516343
commit
fb2ba29b4a
@ -85,20 +85,7 @@ public final class PostsAdapter extends RecyclerView.Adapter<PostViewHolder> {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLoadFailed(@Nullable final GlideException e, final Object model, final Target<Drawable> target, final boolean isFirstResource) {
|
public boolean onLoadFailed(@Nullable final GlideException e, final Object model, final Target<Drawable> target, final boolean isFirstResource) {
|
||||||
holder.progressView.setVisibility(View.GONE);
|
holder.progressView.setVisibility(View.GONE);
|
||||||
try {
|
// glideRequestManager.load(postModel.getDisplayUrl()).into(holder.postImage);
|
||||||
final HttpURLConnection conn = (HttpURLConnection) new URL(postModel.getDisplayUrl()).openConnection();
|
|
||||||
conn.setUseCaches(false);
|
|
||||||
conn.connect();
|
|
||||||
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");
|
|
||||||
if (BuildConfig.DEBUG) Log.e("AWAISKING_APP", "", urle);
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}).into(holder.postImage);
|
}).into(holder.postImage);
|
||||||
|
Loading…
Reference in New Issue
Block a user