diff --git a/app/src/main/java/awais/instagrabber/asyncs/HighlightsFetcher.java b/app/src/main/java/awais/instagrabber/asyncs/HighlightsFetcher.java index b1e2868e..acb7b7c1 100755 --- a/app/src/main/java/awais/instagrabber/asyncs/HighlightsFetcher.java +++ b/app/src/main/java/awais/instagrabber/asyncs/HighlightsFetcher.java @@ -19,25 +19,23 @@ import awais.instagrabber.utils.NetworkUtils; public final class HighlightsFetcher extends AsyncTask> { private final String id; - private final boolean storiesig; private final FetchListener> fetchListener; - public HighlightsFetcher(final String id, final boolean storiesig, final FetchListener> fetchListener) { + public HighlightsFetcher(final String id, final FetchListener> fetchListener) { this.id = id; - this.storiesig = storiesig; this.fetchListener = fetchListener; } @Override protected List doInBackground(final Void... voids) { List result = null; - String url = "https://" + (storiesig ? "storiesig" : "i.instagram") + ".com/api/v1/highlights/" + id + "/highlights_tray/"; + String url = "https://i.instagram.com/api/v1/highlights/" + id + "/highlights_tray/"; try { HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection(); conn.setInstanceFollowRedirects(false); conn.setUseCaches(false); - conn.setRequestProperty("User-Agent", storiesig ? Constants.A_USER_AGENT : Constants.I_USER_AGENT); + conn.setRequestProperty("User-Agent", Constants.I_USER_AGENT); conn.connect(); if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) { diff --git a/app/src/main/java/awais/instagrabber/asyncs/i/iStoryStatusFetcher.java b/app/src/main/java/awais/instagrabber/asyncs/i/iStoryStatusFetcher.java index 2524070e..4ff6bc58 100755 --- a/app/src/main/java/awais/instagrabber/asyncs/i/iStoryStatusFetcher.java +++ b/app/src/main/java/awais/instagrabber/asyncs/i/iStoryStatusFetcher.java @@ -30,7 +30,6 @@ public final class iStoryStatusFetcher extends AsyncTask fetchListener; @@ -38,14 +37,12 @@ public final class iStoryStatusFetcher extends AsyncTask fetchListener) { this.id = id; this.username = username; this.isLoc = isLoc; this.isHashtag = isHashtag; - this.storiesig = storiesig; this.highlight = highlight; this.fetchListener = fetchListener; } @@ -55,13 +52,7 @@ public final class iStoryStatusFetcher extends AsyncTask { + new iStoryStatusFetcher(hashtagModel.getName(), null, false, true, false, stories -> { if (stories != null && stories.length > 0) { binding.mainHashtagImage.setStoriesBorder(); } diff --git a/app/src/main/java/awais/instagrabber/fragments/LocationFragment.java b/app/src/main/java/awais/instagrabber/fragments/LocationFragment.java index 673e040c..f759c624 100644 --- a/app/src/main/java/awais/instagrabber/fragments/LocationFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/LocationFragment.java @@ -293,7 +293,6 @@ public class LocationFragment extends Fragment implements SwipeRefreshLayout.OnR true, false, false, - false, stories -> { if (stories != null && stories.length > 0) { binding.mainLocationImage.setStoriesBorder(); diff --git a/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java b/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java index 2365bdae..57308082 100644 --- a/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java @@ -544,7 +544,6 @@ public class StoryViewerFragment extends Fragment { }; storiesService.getUserStory(currentStoryMediaId, username, - !isLoggedIn && settingsHelper.getString(Constants.STORY_VIEWER) == StoryViewerChoice.STORIESIG.getValue(), false, false, isHighlight, diff --git a/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java b/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java index 68f4b3bf..638f3749 100644 --- a/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java @@ -441,12 +441,11 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe } binding.isVerified.setVisibility(profileModel.isVerified() ? View.VISIBLE : View.GONE); final String profileId = profileModel.getId(); - if (settingsHelper.getString(Constants.STORY_VIEWER).equals(StoryViewerChoice.STORIESIG.getValue()) || isLoggedIn) { + if (isLoggedIn) { new iStoryStatusFetcher(profileId, profileModel.getUsername(), false, false, - !isLoggedIn && settingsHelper.getString(Constants.STORY_VIEWER).equals(StoryViewerChoice.STORIESIG.getValue()), false, result -> { storyModels = result; @@ -455,7 +454,6 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe } }).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); new HighlightsFetcher(profileId, - !isLoggedIn && settingsHelper.getString(Constants.STORY_VIEWER).equals(StoryViewerChoice.STORIESIG.getValue()), result -> { if (result != null) { binding.highlightsList.setVisibility(View.VISIBLE); diff --git a/app/src/main/java/awais/instagrabber/models/enums/StoryViewerChoice.java b/app/src/main/java/awais/instagrabber/models/enums/StoryViewerChoice.java index 38b91bc3..dd38d7ac 100755 --- a/app/src/main/java/awais/instagrabber/models/enums/StoryViewerChoice.java +++ b/app/src/main/java/awais/instagrabber/models/enums/StoryViewerChoice.java @@ -4,9 +4,8 @@ import java.io.Serializable; public enum StoryViewerChoice implements Serializable { NONE(0), - STORIESIG(1), - ALOINSTAGRAM(2), - INSTADP(3); + ALOINSTAGRAM(1), + INSTADP(2); private int value; diff --git a/app/src/main/java/awais/instagrabber/webservices/StoriesService.java b/app/src/main/java/awais/instagrabber/webservices/StoriesService.java index 14e3fc7e..fb5bba2c 100644 --- a/app/src/main/java/awais/instagrabber/webservices/StoriesService.java +++ b/app/src/main/java/awais/instagrabber/webservices/StoriesService.java @@ -98,14 +98,12 @@ public class StoriesService extends BaseService { public void getUserStory(final String id, final String username, - final boolean storiesig, final boolean isLoc, final boolean isHashtag, final boolean highlight, final ServiceCallback> callback) { - final String url = buildUrl(id, storiesig, isLoc, isHashtag, highlight); - final String userAgent = storiesig ? Constants.A_USER_AGENT : Constants.I_USER_AGENT; - final Call userStoryCall = repository.getUserStory(userAgent, url); + final String url = buildUrl(id, isLoc, isHashtag, highlight); + final Call userStoryCall = repository.getUserStory(Constants.I_USER_AGENT, url); userStoryCall.enqueue(new Callback() { @Override public void onResponse(@NonNull final Call call, @NonNull final Response response) { @@ -119,7 +117,7 @@ public class StoriesService extends BaseService { } data = new JSONObject(body); - if (!storiesig && !highlight) + if (!highlight) data = data.optJSONObject((isLoc || isHashtag) ? "story" : "reel"); else if (highlight) data = data.getJSONObject("reels").optJSONObject(id); @@ -243,16 +241,10 @@ public class StoriesService extends BaseService { }); } - private String buildUrl(final String id, final boolean storiesig, final boolean isLoc, final boolean isHashtag, final boolean highlight) { + private String buildUrl(final String id, final boolean isLoc, final boolean isHashtag, final boolean highlight) { final String userId = id.replace(":", "%3A"); final StringBuilder builder = new StringBuilder(); - builder.append("https://"); - if (storiesig) { - builder.append("storiesig"); - } else { - builder.append("i.instagram"); - } - builder.append(".com/api/v1/"); + builder.append("https://i.instagram.com/api/v1/"); if (isLoc) { builder.append("locations/"); } @@ -266,11 +258,7 @@ public class StoriesService extends BaseService { } builder.append(userId); if (!highlight) { - if (storiesig) { - builder.append("/reel_media/"); - } else { - builder.append("/story/"); - } + builder.append("/story/"); } return builder.toString(); } diff --git a/app/src/main/res/values-de/arrays.xml b/app/src/main/res/values-de/arrays.xml index 088c4a46..ce2a1fbc 100644 --- a/app/src/main/res/values-de/arrays.xml +++ b/app/src/main/res/values-de/arrays.xml @@ -42,7 +42,6 @@ Deaktivieren - storiesig Aloinstagram Instadp diff --git a/app/src/main/res/values-es/arrays.xml b/app/src/main/res/values-es/arrays.xml index 774dcb7b..135783ea 100755 --- a/app/src/main/res/values-es/arrays.xml +++ b/app/src/main/res/values-es/arrays.xml @@ -42,7 +42,6 @@ Disable - storiesig Aloinstagram Instadp diff --git a/app/src/main/res/values-fa/arrays.xml b/app/src/main/res/values-fa/arrays.xml index 76e43ab5..7a46c80a 100644 --- a/app/src/main/res/values-fa/arrays.xml +++ b/app/src/main/res/values-fa/arrays.xml @@ -42,7 +42,6 @@ غیرفعال - استوری های ig Aloinstagram Instadp diff --git a/app/src/main/res/values-fr/arrays.xml b/app/src/main/res/values-fr/arrays.xml index 34fb31e8..d3873b53 100755 --- a/app/src/main/res/values-fr/arrays.xml +++ b/app/src/main/res/values-fr/arrays.xml @@ -42,7 +42,6 @@ Disable - storiesig Aloinstagram Instadp diff --git a/app/src/main/res/values-in/arrays.xml b/app/src/main/res/values-in/arrays.xml index 9a8969fa..54736873 100644 --- a/app/src/main/res/values-in/arrays.xml +++ b/app/src/main/res/values-in/arrays.xml @@ -42,7 +42,6 @@ Nonaktifkan - storiesig Aloinstagram Instadp diff --git a/app/src/main/res/values-it/arrays.xml b/app/src/main/res/values-it/arrays.xml index 0332b8d4..7c0d00d8 100755 --- a/app/src/main/res/values-it/arrays.xml +++ b/app/src/main/res/values-it/arrays.xml @@ -42,7 +42,6 @@ Disattiva - storiesig Aloinstagram Instadp diff --git a/app/src/main/res/values-mk/arrays.xml b/app/src/main/res/values-mk/arrays.xml index e25cc849..3d671204 100644 --- a/app/src/main/res/values-mk/arrays.xml +++ b/app/src/main/res/values-mk/arrays.xml @@ -42,7 +42,6 @@ Disable - storiesig Aloinstagram Instadp diff --git a/app/src/main/res/values-pl/arrays.xml b/app/src/main/res/values-pl/arrays.xml index cb45f646..71a651d0 100644 --- a/app/src/main/res/values-pl/arrays.xml +++ b/app/src/main/res/values-pl/arrays.xml @@ -42,7 +42,6 @@ Disable - storiesig Aloinstagram Instadp diff --git a/app/src/main/res/values-pt/arrays.xml b/app/src/main/res/values-pt/arrays.xml index 86a68b2e..c469e24c 100644 --- a/app/src/main/res/values-pt/arrays.xml +++ b/app/src/main/res/values-pt/arrays.xml @@ -42,7 +42,6 @@ Disable - storiesig Aloinstagram Instadp diff --git a/app/src/main/res/values-ru/arrays.xml b/app/src/main/res/values-ru/arrays.xml index 995f1dbc..d9a71cac 100644 --- a/app/src/main/res/values-ru/arrays.xml +++ b/app/src/main/res/values-ru/arrays.xml @@ -42,7 +42,6 @@ Disable - storiesig Aloinstagram Instadp diff --git a/app/src/main/res/values-tr/arrays.xml b/app/src/main/res/values-tr/arrays.xml index a801b947..576645a2 100644 --- a/app/src/main/res/values-tr/arrays.xml +++ b/app/src/main/res/values-tr/arrays.xml @@ -42,7 +42,6 @@ Devredışı Bırak - storiesig Aloinstagram Instadp diff --git a/app/src/main/res/values-zh/arrays.xml b/app/src/main/res/values-zh/arrays.xml index e2561ddb..e89bd427 100755 --- a/app/src/main/res/values-zh/arrays.xml +++ b/app/src/main/res/values-zh/arrays.xml @@ -42,7 +42,6 @@ 禁用 - storiesig Aloinstagram Instadp diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 3a65c322..5e8ca0b2 100755 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -42,7 +42,6 @@ Disable - storiesig Aloinstagram Instadp