Exemple #1
0
 private void UpdateRequestedUsers(Action onSuccess = null, Action <Error> onError = null)
 {
     SdkFriendsLogic.Instance.GetRequestedUsers(users =>
     {
         Requested = users;
         RequestedUsersUpdatedEvent?.Invoke();
         onSuccess?.Invoke();
     }, onError);
 }
Exemple #2
0
 private void RemoveUserFromMemory(FriendModel user)
 {
     if (Friends.Contains(user))
     {
         Friends.Remove(user);
         UserFriendsUpdatedEvent?.Invoke();
     }
     if (Pending.Contains(user))
     {
         Pending.Remove(user);
         PendingUsersUpdatedEvent?.Invoke();
     }
     if (Requested.Contains(user))
     {
         Requested.Remove(user);
         RequestedUsersUpdatedEvent?.Invoke();
     }
     if (Blocked.Contains(user))
     {
         Blocked.Remove(user);
         BlockedUsersUpdatedEvent?.Invoke();
     }
 }