Browse Source
Merge pull request #1113 from tcely/patch-1
Open instagr.am links too
renovate/org.robolectric-robolectric-4.x
Austin Huang
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
6 additions and
1 deletions
-
app/src/main/AndroidManifest.xml
-
app/src/main/java/awais/instagrabber/utils/IntentUtils.java
|
|
@ -54,6 +54,8 @@ |
|
|
|
<data android:scheme="https" /> |
|
|
|
<data android:host="ig.me" /> |
|
|
|
<data android:host="www.ig.me" /> |
|
|
|
<data android:host="instagr.am" /> |
|
|
|
<data android:host="www.instagr.am" /> |
|
|
|
<data android:host="instagram.com" /> |
|
|
|
<data android:host="www.instagram.com" /> |
|
|
|
<data android:pathPrefix="/" /> |
|
|
@ -173,4 +175,4 @@ |
|
|
|
android:value="Noto Color Emoji Compat" /> |
|
|
|
</application> |
|
|
|
|
|
|
|
</manifest> |
|
|
|
</manifest> |
|
|
@ -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"); |
|
|
|
|
|
|
|