From b741ff9ccb849577f321661dff01eaa63c7ddba7 Mon Sep 17 00:00:00 2001 From: tcely Date: Fri, 23 Apr 2021 22:36:12 -0400 Subject: [PATCH] Replace instagr.am with instagram.com --- app/src/main/java/awais/instagrabber/utils/IntentUtils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/awais/instagrabber/utils/IntentUtils.java b/app/src/main/java/awais/instagrabber/utils/IntentUtils.java index 80271c64..45af5970 100644 --- a/app/src/main/java/awais/instagrabber/utils/IntentUtils.java +++ b/app/src/main/java/awais/instagrabber/utils/IntentUtils.java @@ -12,6 +12,9 @@ public final class IntentUtils { @Nullable public static IntentModel parseUrl(@NonNull String url) { + if (url.contains("instagr.am/")) { + url = url.replaceFirst("s?://(?:www\\.)?instagr\\.am/", "s://www.instagram.com/"); + } final int wwwDel = url.contains("www.") ? 4 : 0; final boolean isHttps = url.startsWith("https");