From 93c076bf2367268f55408137973781cb492cc0c0 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Sun, 19 Nov 2023 11:38:33 -0500 Subject: Temporarily disable showing Reddit preview images in posts. --- .../ml/docilealligator/infinityforreddit/markdown/MarkdownUtils.java | 2 +- .../main/java/ml/docilealligator/infinityforreddit/utils/Utils.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/markdown/MarkdownUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/markdown/MarkdownUtils.java index d3d4387d..74d45bd0 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/markdown/MarkdownUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/markdown/MarkdownUtils.java @@ -51,7 +51,7 @@ public class MarkdownUtils { .usePlugin(MovementMethodPlugin.create(new SpoilerAwareMovementMethod() .setOnLinkLongClickListener(onLinkLongClickListener))) .usePlugin(LinkifyPlugin.create(Linkify.WEB_URLS)) - .usePlugin(imageAndGifPlugin) + //.usePlugin(imageAndGifPlugin) .usePlugin(TableEntryPlugin.create(context)) .build(); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java index f5f3b163..ed88d6f9 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java @@ -150,7 +150,8 @@ public final class Utils { } public static String parseInlineRedditImages(String markdown) { - StringBuilder markdownStringBuilder = new StringBuilder(markdown); + return markdown; + /*StringBuilder markdownStringBuilder = new StringBuilder(markdown); Pattern inlineRedditImagePattern = REGEX_PATTERNS[6]; Matcher matcher = inlineRedditImagePattern.matcher(markdownStringBuilder); int start = 0; @@ -161,7 +162,7 @@ public final class Utils { matcher = inlineRedditImagePattern.matcher(markdownStringBuilder); } - return markdownStringBuilder.toString(); + return markdownStringBuilder.toString();*/ } public static String trimTrailingWhitespace(String source) { -- cgit v1.2.3