Пример #1
0
    void OnRemoveUserPressed(string userId)
    {
        if (!contributorsList.Remove(userId))
        {
            return;
        }

        view.RemoveUser(userId);
        friendsSearchPromptController.SetUsersInRolList(contributorsList);
        view.SetEmptyList(contributorsList.Count == 0);
        view.SetContributorsCount(contributorsList.Count);
        contributorsUpdatePayload.contributors = contributorsList.ToArray();
        OnRequestUpdateSceneContributors?.Invoke(sceneId, contributorsUpdatePayload);
    }
Пример #2
0
    void OnAddUserPressed(string userId)
    {
        if (contributorsList.Contains(userId))
        {
            return;
        }

        contributorsList.Add(userId);
        AddContributor(userId);
        friendsSearchPromptController.SetUsersInRolList(contributorsList);
        view.SetEmptyList(false);
        view.SetContributorsCount(contributorsList.Count);
        contributorsUpdatePayload.contributors = contributorsList.ToArray();
        OnRequestUpdateSceneContributors?.Invoke(sceneId, contributorsUpdatePayload);
    }
Пример #3
0
 private void OnUpdateSceneContributorsRequested(string id, SceneContributorsUpdatePayload payload)
 {
     OnRequestUpdateSceneContributors?.Invoke(id, payload);
 }