private void IsFollowing() { Communities.IsFollowing(UserId.CurrentUser(), FollowQuery.Users(FormUserList()), follows => { _console.LogD("Current user is following: " + follows.ToDebugString()); }, OnError); }
protected void ShowActions(User user) { Communities.IsFollowing(UserId.CurrentUser(), FollowQuery.Users(UserIdList.Create(user.Id)), result => { var isFollower = result.ContainsKey(user.Id) && result[user.Id]; Communities.IsFriend(UserId.Create(user.Id), isFriend => { ShowActions(user, isFollower, isFriend); }, error => _console.LogE(error.ToString())); }, error => _console.LogE(error.ToString())); }
protected override void OnDataChanged(List <User> list) { if (list.Count == 0) { return; } var users = UserIdList.Create(list.ConvertAll(it => it.Id)); Communities.AreFriends(users, areFriends => { _areFriends.AddAll(areFriends); }, error => _console.LogE(error.Message)); Communities.IsFollowing(UserId.CurrentUser(), FollowQuery.Users(users), follows => { _follows.AddAll(follows); }, error => _console.LogE(error.Message)); }