From fb2ba29b4ae015c96478c6ced63064e82f09a107 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Mon, 6 Jul 2020 14:52:47 -0400 Subject: [PATCH] maybe simpler is better --- .../awais/instagrabber/adapters/PostsAdapter.java | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/adapters/PostsAdapter.java b/app/src/main/java/awais/instagrabber/adapters/PostsAdapter.java index d74a9efd..3750cc64 100755 --- a/app/src/main/java/awais/instagrabber/adapters/PostsAdapter.java +++ b/app/src/main/java/awais/instagrabber/adapters/PostsAdapter.java @@ -85,20 +85,7 @@ public final class PostsAdapter extends RecyclerView.Adapter { @Override public boolean onLoadFailed(@Nullable final GlideException e, final Object model, final Target target, final boolean isFirstResource) { holder.progressView.setVisibility(View.GONE); - try { - 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); - } + // glideRequestManager.load(postModel.getDisplayUrl()).into(holder.postImage); return false; } }).into(holder.postImage);