public void HandleStreamUpdatedEvent(Club.ClubStreamUpdatedEvent streamUpdatedEvent)
 {
     if (this.m_streamList.ContainsKey(streamUpdatedEvent.StreamID))
     {
         this.m_streamList[streamUpdatedEvent.StreamID].HandleStreamUpdatedEvent(streamUpdatedEvent);
     }
 }
Exemple #2
0
 private void OnStreamUpdated(Club.ClubStreamUpdatedEvent streamUpdatedEvent)
 {
     if (this.m_focusedStream != null && this.m_community != null && streamUpdatedEvent.StreamID == this.m_focusedStream.StreamId && streamUpdatedEvent.ClubID == this.m_community.ClubId && base.gameObject.activeSelf && !this.m_community.CanAccessUpdatedChannel(streamUpdatedEvent))
     {
         this.ForceCloseChatPanel();
         AllPopups.instance.ShowGenericPopupFull(StaticDB.GetString("CHANNEL_NO_LONGER_VALID", "[PH] The channel is no longer valid."));
     }
 }
 private void OnStreamUpdated(Club.ClubStreamUpdatedEvent updateStreamEvent)
 {
     if (CommunityData.m_communityDictionary.ContainsKey(updateStreamEvent.ClubID))
     {
         CommunityData.m_communityDictionary[updateStreamEvent.ClubID].HandleStreamUpdatedEvent(updateStreamEvent);
         this.FireChannelRefreshCallback(updateStreamEvent.ClubID);
     }
 }
        public void HandleStreamUpdatedEvent(Club.ClubStreamUpdatedEvent streamUpdatedEvent)
        {
            ClubStreamInfo?streamInfo = Club.GetStreamInfo(streamUpdatedEvent.ClubID, streamUpdatedEvent.StreamID);

            if (streamInfo != null)
            {
                this.m_streamInfo = streamInfo.Value;
            }
        }
        public bool CanAccessUpdatedChannel(Club.ClubStreamUpdatedEvent streamUpdatedEvent)
        {
            ClubStreamInfo?streamInfo = Club.GetStreamInfo(streamUpdatedEvent.ClubID, streamUpdatedEvent.StreamID);

            if (streamInfo != null)
            {
                if (!streamInfo.Value.leadersAndModeratorsOnly)
                {
                    return(true);
                }
                CommunityMember communityMember = this.m_memberList.Find((CommunityMember member) => member.IsSelf);
                if (communityMember != null && communityMember.IsModerator)
                {
                    return(true);
                }
            }
            return(false);
        }