Browse Source
profile details fix
renovate/org.robolectric-robolectric-4.x
Austin Huang
4 years ago
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
2 changed files with
5 additions and
4 deletions
-
app/src/main/java/awais/instagrabber/asyncs/ProfileFetcher.java
-
app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.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 |
|
|
|
@ -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(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |