コード例 #1
0
 private void FetchUserGroups(IFizzFetchUserGroupsQuery groupFetchQuery, List <IFizzUserGroup> userGroups)
 {
     if (groupFetchQuery.HasNext)
     {
         groupFetchQuery.Next((groupList, ex) =>
         {
             if (ex == null)
             {
                 foreach (IFizzUserGroup group in groupList)
                 {
                     if (group.State == FizzGroupMemberState.Pending)
                     {
                         GroupInvites.Add(group.GroupId, group);
                     }
                     userGroups.Add(group);
                 }
                 FetchUserGroups(groupFetchQuery, userGroups);
             }
         });
     }
     else
     {
         FetchGroups(userGroups);
     }
 }
コード例 #2
0
        private void SubscribeNotificationsAndFetchGroups()
        {
            if (Client.State == FizzClientState.Closed)
            {
                FizzLogger.W("FizzClient should be opened before subscribing user.");
                return;
            }

            Client.Chat.UserNotifications.Subscribe(ex =>
            {
                if (ex == null)
                {
                    if (ex == null)
                    {
                        IFizzFetchUserGroupsQuery groupFetchQuery = Client.Chat.Users.BuildFetchUserGroupsQuery(UserId);
                        FetchUserGroups(groupFetchQuery, new List <IFizzUserGroup>());
                    }
                }
            });
        }