From 63e27eb23a87835768f725f4ab7e0dffd56575c2 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Wed, 21 Jul 2021 22:40:03 +0800 Subject: Support one more image domain. Have not validate the link yet. --- .../infinityforreddit/activities/LinkResolverActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/src') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java index 2a26ae10..e4b9387c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java @@ -118,7 +118,11 @@ public class LinkResolverActivity extends AppCompatActivity { List segments = uri.getPathSegments(); if (authority != null) { - if (authority.equals("v.redd.it")) { + if (authority.equals("reddit-uploaded-media.s3-accelerate.amazonaws.com")) { + Intent intent = new Intent(this, ViewImageOrGifActivity.class); + intent.putExtra(ViewImageOrGifActivity.EXTRA_IMAGE_URL_KEY, uri.toString()); + startActivity(intent); + } else if (authority.equals("v.redd.it")) { Intent intent = new Intent(this, ViewVideoActivity.class); intent.putExtra(ViewVideoActivity.EXTRA_VIDEO_TYPE, ViewVideoActivity.VIDEO_TYPE_V_REDD_IT); intent.putExtra(ViewVideoActivity.EXTRA_V_REDD_IT_URL, uri.toString()); -- cgit v1.2.3