1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-22 22:57:29 +00:00

profile details fix

This commit is contained in:
Austin Huang 2021-01-11 18:01:28 -05:00
parent e8711379d0
commit 3e84786c46
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
2 changed files with 5 additions and 4 deletions

View File

@ -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("has_requested_viewer"),
userJson.optBoolean("restricted_by_viewer"), userJson.optBoolean("requested_by_viewer"),
false, false,
userJson.optBoolean("restricted_by_viewer"), userJson.optBoolean("restricted_by_viewer"),
false false

View File

@ -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();
} }
} }