1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-26 00:27:30 +00:00

Replace instagr.am with instagram.com

This commit is contained in:
tcely 2021-04-23 22:36:12 -04:00 committed by GitHub
parent fdcc6768bc
commit b741ff9ccb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,9 @@ public final class IntentUtils {
@Nullable @Nullable
public static IntentModel parseUrl(@NonNull String url) { 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 int wwwDel = url.contains("www.") ? 4 : 0;
final boolean isHttps = url.startsWith("https"); final boolean isHttps = url.startsWith("https");