aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java20
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java1
2 files changed, 20 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java
index 0b605ec7..f2abbf7c 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java
@@ -2055,6 +2055,26 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy
imageRequestBuilder.centerInside().downsample(mSaveMemoryCenterInsideDownsampleStrategy).into(((PostCard2WithPreviewViewHolder) holder).imageView);
}
}
+ } else if (holder instanceof PostMaterial3CardWithPreviewViewHolder) {
+ Post post = ((PostMaterial3CardWithPreviewViewHolder) holder).post;
+ Post.Preview preview = ((PostMaterial3CardWithPreviewViewHolder) holder).preview;
+ if (preview != null) {
+ String url;
+ boolean blurImage = (post.isNSFW() && mNeedBlurNsfw && !(post.getPostType() == Post.GIF_TYPE && mAutoplay && mAutoplayNsfwVideos)) || (post.isSpoiler() && mNeedBlurSpoiler);
+ if (post.getPostType() == Post.GIF_TYPE && mAutoplay && !blurImage) {
+ url = post.getUrl();
+ } else {
+ url = preview.getPreviewUrl();
+ }
+ RequestBuilder<Drawable> imageRequestBuilder = mGlide.load(url).listener(((PostMaterial3CardWithPreviewViewHolder) holder).glideRequestListener);
+
+ if (blurImage) {
+ imageRequestBuilder.apply(RequestOptions.bitmapTransform(new BlurTransformation(50, 10)))
+ .into(((PostMaterial3CardWithPreviewViewHolder) holder).binding.imageViewItemPostCard3WithPreview);
+ } else {
+ imageRequestBuilder.centerInside().downsample(mSaveMemoryCenterInsideDownsampleStrategy).into(((PostMaterial3CardWithPreviewViewHolder) holder).binding.imageViewItemPostCard3WithPreview);
+ }
+ }
}
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java
index 72f6df70..0293ad5b 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java
@@ -23,7 +23,6 @@ public class APIUtils {
public static final String IMGUR_API_BASE_URI = "https://api.imgur.com/3/";
public static final String PUSHSHIFT_API_BASE_URI = "https://api.pushshift.io/";
public static final String REVEDDIT_API_BASE_URI = "https://api.reveddit.com/";
- public static final String STRAPI_BASE_URI = "https://strapi.reddit.com";
public static final String STREAMABLE_API_BASE_URI = "https://api.streamable.com";
public static final String CLIENT_ID_KEY = "client_id";