Browse Source

profile details fix

renovate/org.robolectric-robolectric-4.x
Austin Huang 4 years ago
parent
commit
3e84786c46
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 4
      app/src/main/java/awais/instagrabber/asyncs/ProfileFetcher.java
  2. 5
      app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java

4
app/src/main/java/awais/instagrabber/asyncs/ProfileFetcher.java

@ -76,8 +76,8 @@ public final class ProfileFetcher extends AsyncTask<Void, Void, User> {
userJson.optBoolean("blocked_by_viewer"), userJson.optBoolean("blocked_by_viewer"),
false, false,
isPrivate, isPrivate,
false,
userJson.optBoolean("restricted_by_viewer"),
userJson.optBoolean("has_requested_viewer"),
userJson.optBoolean("requested_by_viewer"),
false, false,
userJson.optBoolean("restricted_by_viewer"), userJson.optBoolean("restricted_by_viewer"),
false false

5
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) .setNegativeButton(R.string.cancel, null)
.show(); .show();
} else if (profileModel.getFriendshipStatus().isFollowing() || profileModel.getFriendshipStatus().isOutgoingRequest()) {
}
else if (profileModel.getFriendshipStatus().isFollowing() || profileModel.getFriendshipStatus().isOutgoingRequest()) {
friendshipService.unfollow( friendshipService.unfollow(
profileModel.getPk(), profileModel.getPk(),
new ServiceCallback<FriendshipChangeResponse>() { new ServiceCallback<FriendshipChangeResponse>() {
@ -1091,6 +1092,6 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
private boolean isReallyPrivate() { private boolean isReallyPrivate() {
final long myId = CookieUtils.getUserIdFromCookie(cookie); final long myId = CookieUtils.getUserIdFromCookie(cookie);
final FriendshipStatus friendshipStatus = profileModel.getFriendshipStatus(); final FriendshipStatus friendshipStatus = profileModel.getFriendshipStatus();
return !friendshipStatus.isFollowedBy() && (profileModel.getPk() != myId) && profileModel.isPrivate();
return !friendshipStatus.isFollowing() && (profileModel.getPk() != myId) && profileModel.isPrivate();
} }
} }
Loading…
Cancel
Save