From 3e84786c4662ea21cbfa7d1771b03398cea37e0d Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Mon, 11 Jan 2021 18:01:28 -0500 Subject: [PATCH] profile details fix --- .../main/java/awais/instagrabber/asyncs/ProfileFetcher.java | 4 ++-- .../awais/instagrabber/fragments/main/ProfileFragment.java | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/asyncs/ProfileFetcher.java b/app/src/main/java/awais/instagrabber/asyncs/ProfileFetcher.java index 514f8692..6218ef8b 100755 --- a/app/src/main/java/awais/instagrabber/asyncs/ProfileFetcher.java +++ b/app/src/main/java/awais/instagrabber/asyncs/ProfileFetcher.java @@ -76,8 +76,8 @@ public final class ProfileFetcher extends AsyncTask { userJson.optBoolean("blocked_by_viewer"), false, isPrivate, - false, - userJson.optBoolean("restricted_by_viewer"), + userJson.optBoolean("has_requested_viewer"), + userJson.optBoolean("requested_by_viewer"), false, userJson.optBoolean("restricted_by_viewer"), false 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 be1064a1..1b2a9a5e 100644 --- a/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java @@ -912,7 +912,8 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe })) .setNegativeButton(R.string.cancel, null) .show(); - } else if (profileModel.getFriendshipStatus().isFollowing() || profileModel.getFriendshipStatus().isOutgoingRequest()) { + } + else if (profileModel.getFriendshipStatus().isFollowing() || profileModel.getFriendshipStatus().isOutgoingRequest()) { friendshipService.unfollow( profileModel.getPk(), new ServiceCallback() { @@ -1091,6 +1092,6 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe private boolean isReallyPrivate() { final long myId = CookieUtils.getUserIdFromCookie(cookie); final FriendshipStatus friendshipStatus = profileModel.getFriendshipStatus(); - return !friendshipStatus.isFollowedBy() && (profileModel.getPk() != myId) && profileModel.isPrivate(); + return !friendshipStatus.isFollowing() && (profileModel.getPk() != myId) && profileModel.isPrivate(); } }