Austin Huang 4 years ago
parent
commit
1fda45c01a
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 4
      app/src/main/java/awais/instagrabber/activities/PostViewer.java
  2. 2
      app/src/main/java/awais/instagrabber/asyncs/CommentsFetcher.java
  3. 2
      app/src/main/java/awais/instagrabber/utils/Utils.java

4
app/src/main/java/awais/instagrabber/activities/PostViewer.java

@ -222,11 +222,9 @@ public final class PostViewer extends BaseLanguageActivity {
viewerBinding.bottomPanel.commentsCount.setText(String.valueOf(commentsCount)); viewerBinding.bottomPanel.commentsCount.setText(String.valueOf(commentsCount));
viewerBinding.bottomPanel.btnComments.setVisibility(View.VISIBLE); viewerBinding.bottomPanel.btnComments.setVisibility(View.VISIBLE);
postShortCode = result[0].getShortCode();
viewerBinding.bottomPanel.btnComments.setOnClickListener(v -> viewerBinding.bottomPanel.btnComments.setOnClickListener(v ->
startActivityForResult(new Intent(this, CommentsViewer.class) startActivityForResult(new Intent(this, CommentsViewer.class)
.putExtra(Constants.EXTRAS_SHORTCODE, postShortCode)
.putExtra(Constants.EXTRAS_SHORTCODE, postModel.getShortCode())
.putExtra(Constants.EXTRAS_POST, viewerPostModel.getPostId()) .putExtra(Constants.EXTRAS_POST, viewerPostModel.getPostId())
.putExtra(Constants.EXTRAS_USER, postUserId), 6969)); .putExtra(Constants.EXTRAS_USER, postUserId), 6969));
viewerBinding.bottomPanel.btnComments.setClickable(true); viewerBinding.bottomPanel.btnComments.setClickable(true);

2
app/src/main/java/awais/instagrabber/asyncs/CommentsFetcher.java

@ -148,7 +148,7 @@ public final class CommentsFetcher extends AsyncTask<Void, Void, CommentModel[]>
String endCursor = ""; String endCursor = "";
while (endCursor != null) { while (endCursor != null) {
final String url = "https://www.instagram.com/graphql/query/?query_hash=97b41c52301f77ce508f55e66d17620e&variables=" +
final String url = "https://www.instagram.com/graphql/query/?query_hash=bc3296d1ce80a24b1b6e40b1e72903f5&variables=" +
"{\"shortcode\":\"" + shortCode + "\",\"first\":50,\"after\":\"" + endCursor + "\"}"; "{\"shortcode\":\"" + shortCode + "\",\"first\":50,\"after\":\"" + endCursor + "\"}";
try { try {

2
app/src/main/java/awais/instagrabber/utils/Utils.java

@ -1226,7 +1226,7 @@ public final class Utils {
final int endIndex = (spaceIndex != -1 ? spaceIndex : length); final int endIndex = (spaceIndex != -1 ? spaceIndex : length);
final String extractUrl = url.substring(startIndex, Math.min(length, endIndex) - 1);
final String extractUrl = url.substring(startIndex, Math.min(length, endIndex));
final SpannableString spannableString = new SpannableString(url); final SpannableString spannableString = new SpannableString(url);
spannableString.setSpan(new URLSpan(extractUrl), startIndex, endIndex, 0); spannableString.setSpan(new URLSpan(extractUrl), startIndex, endIndex, 0);

Loading…
Cancel
Save