aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator
diff options
context:
space:
mode:
authorscria1000 <91804886+scria1000@users.noreply.github.com>2021-12-03 21:06:45 +0000
committerGitHub <noreply@github.com>2021-12-03 21:06:45 +0000
commitc9e7b113798049df72414ed6ad01f9fe1d2081a7 (patch)
tree166c9bb1940ad1981eac2d20892c84bcde35760f /app/src/main/java/ml/docilealligator
parent0d80bee501e5feb9e0e1781a61c9bc771189ede4 (diff)
downloadinfinity-for-reddit-c9e7b113798049df72414ed6ad01f9fe1d2081a7.tar
infinity-for-reddit-c9e7b113798049df72414ed6ad01f9fe1d2081a7.tar.gz
infinity-for-reddit-c9e7b113798049df72414ed6ad01f9fe1d2081a7.tar.bz2
infinity-for-reddit-c9e7b113798049df72414ed6ad01f9fe1d2081a7.tar.lz
infinity-for-reddit-c9e7b113798049df72414ed6ad01f9fe1d2081a7.tar.xz
infinity-for-reddit-c9e7b113798049df72414ed6ad01f9fe1d2081a7.tar.zst
infinity-for-reddit-c9e7b113798049df72414ed6ad01f9fe1d2081a7.zip
Fix gif not found for downsized Giphy gifs
Diffstat (limited to 'app/src/main/java/ml/docilealligator')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java4
1 files changed, 2 insertions, 2 deletions
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 e7ee8d6a..79a294be 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java
@@ -124,14 +124,14 @@ public class Utils {
Pattern inlineGifPattern = Pattern.compile("!\\[gif]\\(giphy\\|\\w+\\)");
Matcher matcher = inlineGifPattern.matcher(markdownStringBuilder);
while (matcher.find()) {
- markdownStringBuilder.replace(matcher.start(), matcher.end(), "[gif](https://media3.giphy.com/media/" + markdownStringBuilder.substring(matcher.start() + "![gif](giphy|".length(), matcher.end() - 1) + "/giphy.mp4)");
+ markdownStringBuilder.replace(matcher.start(), matcher.end(), "[gif](https://i.giphy.com/media/" + markdownStringBuilder.substring(matcher.start() + "![gif](giphy|".length(), matcher.end() - 1) + "/giphy.mp4)");
matcher = inlineGifPattern.matcher(markdownStringBuilder);
}
Pattern inlineGifPattern2 = Pattern.compile("!\\[gif]\\(giphy\\|\\w+\\|downsized\\)");
Matcher matcher2 = inlineGifPattern2.matcher(markdownStringBuilder);
while (matcher2.find()) {
- markdownStringBuilder.replace(matcher2.start(), matcher2.end(), "[gif](https://media3.giphy.com/media/" + markdownStringBuilder.substring(matcher2.start() + "![gif](giphy|".length(), matcher2.end() - "|downsized\\)".length()) + "/giphy.mp4)");
+ markdownStringBuilder.replace(matcher2.start(), matcher2.end(), "[gif](https://i.giphy.com/media/" + markdownStringBuilder.substring(matcher2.start() + "![gif](giphy|".length(), matcher2.end() - "|downsized\\)".length() + 1) + "/giphy.mp4)");
matcher2 = inlineGifPattern2.matcher(markdownStringBuilder);
}