Open ChunxiaZhang opened 9 years ago
Resolve. Cause: They didn't confirm if this user is the user who login. Solution: Add verification to confirm if this is the login user's Code: In UserViewActivity.java: private void checkFollowingUserStatus() { followingStatusChecked = false; // to verify if this this login user if (AccountUtils.getLogin(this).equals(user.login)) { return; } CheckFollowingUser userFollowingClient = new CheckFollowingUser(this, user.login); userFollowingClient.setOnCheckFollowingUser(new OnCheckFollowingUser() { @Override public void onCheckFollowUser(String username, boolean following) { isFollowing = following; followingStatusChecked = true; invalidateOptionsMenu(); } }); userFollowingClient.execute(); }
When I go to my own repo, there is a menu right top corner for following and unfollwing. It's unreasonable to follow or unfollow myself.