From 8c2a5f9f16114d96a1e1fcd1a33e1bf2cfd5f9ff Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Tue, 8 Sep 2020 11:25:37 -0400 Subject: [PATCH 1/3] fix #124 --- app/src/main/java/awais/instagrabber/utils/Utils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/utils/Utils.java b/app/src/main/java/awais/instagrabber/utils/Utils.java index 07856309..12386181 100755 --- a/app/src/main/java/awais/instagrabber/utils/Utils.java +++ b/app/src/main/java/awais/instagrabber/utils/Utils.java @@ -1350,7 +1350,7 @@ public final class Utils { "org.telegram.messenger", "org.thunderdog.challegram", "ir.ilmili.telegraph", - "org.telegram.BifToGram", + // "org.telegram.BifToGram", see GitHub issue 124 "org.vidogram.messenger", "com.xplus.messenger", "com.ellipi.messenger", @@ -1419,4 +1419,4 @@ public final class Utils { } return simpleCache; } -} \ No newline at end of file +} From f1902e82e615c4e4324c03959a40fa21258d8846 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Tue, 8 Sep 2020 11:32:31 -0400 Subject: [PATCH 2/3] sorta fix #127 --- .../fragments/directmessages/DirectMessageThreadFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java b/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java index bab07098..43becd8b 100644 --- a/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java @@ -284,7 +284,8 @@ public class DirectMessageThreadFragment extends Fragment { sendText(null, directItemModel.getItemId(), directItemModel.isLiked()); } else if (which == 2) { - if (String.valueOf(directItemModel.getUserId()).equals(myId)) new ThreadAction().execute("delete", directItemModel.getItemId()); + if (directItemModel == null) Toast.makeText(requireContext(), R.string.downloader_unknown_error, Toast.LENGTH_SHORT).show(); + else if (String.valueOf(directItemModel.getUserId()).equals(myId)) new ThreadAction().execute("delete", directItemModel.getItemId()); else searchUsername(getUser(directItemModel.getUserId()).getUsername()); } }; From 616ee86c5e05091affe58a49d7017503fcc86d41 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Tue, 8 Sep 2020 11:36:38 -0400 Subject: [PATCH 3/3] fix #126 --- app/src/main/java/awais/instagrabber/utils/Utils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/utils/Utils.java b/app/src/main/java/awais/instagrabber/utils/Utils.java index 12386181..4a93c214 100755 --- a/app/src/main/java/awais/instagrabber/utils/Utils.java +++ b/app/src/main/java/awais/instagrabber/utils/Utils.java @@ -180,7 +180,6 @@ public final class Utils { if (clipString.contains("instagram.com/")) { clipString = clipString.substring((isHttps ? 22 : 21) + wwwDel); - final char firstChar = clipString.charAt(0); if (clipString.startsWith("p/") || clipString.startsWith("reel/") || clipString.startsWith("tv/")) { clipString = clipString.substring(clipString.startsWith("p/") ? 2 : (clipString.startsWith("tv/") ? 3 : 5)); type = IntentModelType.POST; @@ -188,7 +187,7 @@ public final class Utils { clipString = clipString.substring(13); type = IntentModelType.HASHTAG; } else if (clipString.startsWith("explore/locations/")) { - clipString = clipString.substring(18); + clipString = clipString.substring(18); // <- to fix type = IntentModelType.LOCATION; } else if (clipString.startsWith("_u/")) { // usually exists in embeds clipString = clipString.substring(3);